Документ взят из кэша поисковой машины. Адрес оригинального документа : http://rtm-cs.sinp.msu.ru/manual/mico/doc/node62.html
Дата изменения: Mon Jun 7 21:54:59 1999
Дата индексирования: Mon Oct 1 21:22:51 2012
Кодировка:
CORBA Compliant Exception Handling next up previous
Next: MICO Specific Exception Handling Up: Exceptions Previous: Exceptions

CORBA Compliant Exception Handling

As the name already indicates this exception handling mode is conformant to the CORBA specification. You can use throw to throw exceptions. Exceptions are caught by specifying the exact type or one of the base types of the exception. Here are some examples:

  // throw CORBA::UNKNOWN exception
  throw CORBA::UNKNOWN();

  // catch CORBA::UNKNOWN exception
  try {
    ...
  } catch (CORBA::UNKNOWN &ex) {
    ...
  }

  // catch all system exceptions (including CORBA::UNKNOWN)
  try {
    ...
  } catch (CORBA::SystemException &ex) {
    ...
  }

  // catch all user exceptions (wont catch CORBA::UNKNOWN)
  try {
    ...
  } catch (CORBA::UserException &ex) {
    ...
  }

  // catch all exceptions (including CORBA::UNKNOWN)
  try {
    ...
  } catch (CORBA::Exception &ex) {
    ...
  }

If an exception is thrown but not caught MICO will print out a short description of the exception and terminate the process.


next up previous
Next: MICO Specific Exception Handling Up: Exceptions Previous: Exceptions

Arno Puder
Mon Jun 7 10:53:40 PDT 1999