OOPortal OOPortal


IDL Constructed Types   «Prev  Next»

Exception Mapping Hierarchy - Quiz

Each question is worth one point. Select the best answer or answers for each question.
 
1. The IDL system exception CORBA::NO_MEMORY is mapped to the Java class org.omg.CORBA_NO_MEMORY. Given that running out of memory is a serious error condition, from which of the following java.lang classes does CORBA_NO_MEMORY inherit?
Please select the best answer.
  A. Error, Throwable
  B. Throwable, Error, RuntimeException, Exception
  C. Exception, Throwable, RuntimeException

2. Should user-defined IDL exceptions be mapped to checked or unchecked Java exceptions, and why?
Please select the best answer.
  A. They should be mapped to unchecked exceptions so that CORBA client code is not forced to put in try-catch blocks for server-side exceptions.
  B. They should be mapped to checked exceptions so that CORBA client code is forced to put in try-catch blocks for server-side exceptions.
  C. They should be mapped to checked exceptions so that CORBA server implementations are forced to put in try-catch blocks to handle exceptions.

3. All user-defined exceptions in IDL are mapped to children of org.omg.CORBA.UserException, with no additional layers of inheritance. Why might this be the case?
Please select the best answer.
  A. Java exceptions are never based on multiple layers of inheritance.
  B. IDL exceptions do not have inheritance.
  C. Neither IDL nor Java exceptions have or make use of inheritance.
Score =
Correct answers: