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
44 UserException (UserException
const &rhs
);
47 virtual ~UserException (void);
49 /// Assignment operator.
50 UserException
&operator= (UserException
const &rhs
);
52 /// The narrow operation.
53 static UserException
*_downcast (CORBA::Exception
*exception
);
55 /// The const version of narrow operation
56 static const UserException
*_downcast (CORBA::Exception
const *exception
);
58 virtual void _raise (void) const = 0;
60 virtual CORBA::TypeCode_ptr
_tao_type (void) const;
62 // = TAO specific extension.
64 /// Constructor from a repository id.
65 UserException (char const *repository_id
, char const *local_name
);
67 /// Returns a string containing information about the exception. This
68 /// function is not CORBA compliant.
69 virtual ACE_CString
_info (void) const;
72 /// Default constructor.
78 TAO_END_VERSIONED_NAMESPACE_DECL
80 #if defined (__ACE_INLINE__)
81 # include "tao/UserException.inl"
82 #endif /* __ACE_INLINE__ */
84 #include /**/"ace/post.h"
86 #endif /* TAO_USER_EXCEPTION_H */