alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx Class Reference

Inheritance diagram for alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx:
Inheritance graph
[legend]
Collaboration diagram for alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AcsJCppAnyEx ()
 AcsJCppAnyEx (String message)
 AcsJCppAnyEx (String message, Throwable cause)
 AcsJCppAnyEx (Throwable cause)
 AcsJCppAnyEx (ErrorTrace etCause)
 AcsJCppAnyEx (String message, ErrorTrace etCause)
String getShortDescription ()
UserException toCorbaException ()
CppAnyEx toCppAnyEx ()

Static Public Member Functions

static AcsJCppAnyEx fromCppAnyEx (CppAnyEx corbaEx)

Protected Member Functions

final int getErrorCode ()

Detailed Description

Java native style exception class representing the error type alma.ACSErr.ACSErrType.ACSErrTypeCppNative, error code CppAny.value.

See also:
AcsJACSErrTypeCppNativeEx
Author:
ACS Error System Code Generator created Sep 25, 2003 4:18:09 PM

Constructor & Destructor Documentation

alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::AcsJCppAnyEx (  )  [inline]

Referenced by fromCppAnyEx().

alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::AcsJCppAnyEx ( String  message  )  [inline]
Deprecated:
The data in message should be given as parameters instead!
alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::AcsJCppAnyEx ( String  message,
Throwable  cause 
) [inline]
Deprecated:
The data in message should be given as parameters instead!
alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::AcsJCppAnyEx ( Throwable  cause  )  [inline]
alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::AcsJCppAnyEx ( ErrorTrace  etCause  )  [inline]
alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::AcsJCppAnyEx ( String  message,
ErrorTrace  etCause 
) [inline]
Deprecated:
The data in message should be given as parameters instead!

Member Function Documentation

static AcsJCppAnyEx alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::fromCppAnyEx ( CppAnyEx  corbaEx  )  [inline, static]

Converts a CORBA CppAny to an instance of this class.

Note that unlike the constructor AcsJErrTest0Ex(ErrorTrace), this static conversion method does not wrap the existing chain of exceptions with a new exception. It simply converts all exceptions found in the ErrorTrace of corbaEx to the corresponding Java exceptions, knowing that the top level exception is of type CppAny and can always be converted to AcsJCppAnyEx.

Here's an example of how to use this method in a Java program that makes a call so some other component etc.:

 private void methodThatMakesARemoteCall() throws AcsJCppAnyEx
 {
   try
   {
     // this fakes the remote call to a method
     // which can throw an CppAnyEx...
     throw new CppAnyEx();
   }
   catch (CppAnyEx corbaEx)
   {
     throw AcsJCppAnyEx.fromCppAnyEx(corbaEx);
   }
 } 
 
Parameters:
corbaEx the CORBA equivalent of this class; will be converted
Returns:
the newly created instance, with data fields and caused-by exceptions converted from corbaEx.

References AcsJCppAnyEx(), and alma::ACSErrTypeCppNative::CppAnyEx::errorTrace.

final int alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::getErrorCode (  )  [inline, protected, virtual]

Returns the error code, which is fixed to 0, given by CppAny.value.

See also:
alma.acs.exceptions.AcsJException::getErrorCode()

Implements alma::acs::exceptions::AcsJException.

String alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::getShortDescription (  )  [inline]

Returns the short description of the error

Reimplemented from alma::acs::exceptions::AcsJException.

UserException alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::toCorbaException (  )  [inline, virtual]
CppAnyEx alma::ACSErrTypeCppNative::wrappers::AcsJCppAnyEx::toCppAnyEx (  )  [inline]

Creates an CppAny that represents this exception with all its caused-by child exceptions.

Typically to be called from a top-level catch block that must convert any of the Java exceptions used internally by the Java program to an IDL type exception that can be thrown on over CORBA.

Returns:
the type-safe subclass of org.omg.CORBA.UserException with an embedded ErrorTrace.
See also:
toCorbaException

References alma::acs::exceptions::AcsJException::getErrorTrace().

Referenced by toCorbaException().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2