3 //=============================================================================
5 * @file Unknown_User_Exception.h
7 * Defines the way an exception is reported by a DII request.
9 * @author Portions Copyright 1994-1995 by Sun Microsystems Inc.
10 * @author Portions Copyright 1997-2003 by Washington University
12 //=============================================================================
15 #ifndef TAO_UNKNOWN_USER_EXCEPTION_H
16 #define TAO_UNKNOWN_USER_EXCEPTION_H
18 #include /**/ "ace/pre.h"
20 #include "tao/DynamicInterface/dynamicinterface_export.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 #include "tao/UserException.h"
28 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 * @class UnknownUserException
35 * @brief UnknownUserException
37 * When user exceptions are received by a DII invocation the ORB
38 * is unable to create the exception with the right dynamic type;
39 * to workaround this problem it throws a
40 * @c CORBA::UnknownUserException that contains the exception inside
43 class TAO_DynamicInterface_Export UnknownUserException
44 : public CORBA::UserException
48 UnknownUserException ();
51 UnknownUserException (CORBA::Any
& exception
);
54 UnknownUserException (const UnknownUserException
& e
);
57 virtual ~UnknownUserException ();
59 /// Return the any containing the user exception.
60 CORBA::Any
& exception ();
62 /// To throw an UnknownUserException of this type.
63 virtual void _raise () const;
65 virtual CORBA::Exception
*_tao_duplicate () const;
66 virtual void _tao_encode (TAO_OutputCDR
&cdr
) const;
67 virtual void _tao_decode (TAO_InputCDR
&cdr
);
69 /// Narrow to an UnknowUserException.
70 static UnknownUserException
* _downcast (CORBA::Exception
*ex
);
71 static UnknownUserException
const * _downcast (CORBA::Exception
const * ex
);
73 /// Return the repository ID of the Exception.
74 virtual const char * _rep_id () const;
76 // = TAO specific extension.
78 /// This class has a specific typecode.
79 virtual CORBA::TypeCode_ptr
_tao_type () const;
82 /// Holder for the actual exception.
83 CORBA::Any
*exception_
;
86 // The CORBA::UnknownUserException TypeCode.
87 extern TAO_DynamicInterface_Export TypeCode_ptr
const _tc_UnknownUserException
;
88 } // End CORBA namespace.
90 TAO_END_VERSIONED_NAMESPACE_DECL
92 #include /**/ "ace/post.h"
94 #endif /* TAO_UNKNOWN_USER_EXCEPTION_H */