3 //=============================================================================
5 * @file UserException.h
7 * CORBA::UserException class header.
9 * @author DOC Group at Vanderbilt U, Wash U, and UCI
10 * @author Ossama Othman <ossama@dre.vanderbilt.edu>
12 //=============================================================================
14 #ifndef TAO_USER_EXCEPTION_H
15 #define TAO_USER_EXCEPTION_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "tao/TAO_Export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "tao/Exception.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 * @class UserException
34 * @brief Application- or OMG- defined CORBA exception sub-class.
36 * User exceptions can be defined in application OMG IDL or by the
37 * OMG itself for IDL interfaces and services it defines.
39 class TAO_Export UserException
: public Exception
43 UserException (UserException
const &rhs
);
46 virtual ~UserException () = default;
48 /// Assignment operator.
49 UserException
&operator= (UserException
const &rhs
);
51 /// The narrow operation.
52 static UserException
*_downcast (CORBA::Exception
*exception
);
54 /// The const version of narrow operation
55 static const UserException
*_downcast (CORBA::Exception
const *exception
);
57 virtual void _raise () const = 0;
59 virtual CORBA::TypeCode_ptr
_tao_type () const;
61 // = TAO specific extension.
63 /// Constructor from a repository id.
64 UserException (char const *repository_id
, char const *local_name
);
66 /// Returns a string containing information about the exception. This
67 /// function is not CORBA compliant.
68 virtual ACE_CString
_info () const;
71 /// Default constructor.
76 TAO_END_VERSIONED_NAMESPACE_DECL
78 #if defined (__ACE_INLINE__)
79 # include "tao/UserException.inl"
80 #endif /* __ACE_INLINE__ */
82 #include /**/"ace/post.h"
84 #endif /* TAO_USER_EXCEPTION_H */