blob: 4a2a88379a1f74e5596cd035b8b02233c4371ecb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
// -*- C++ -*-
//=============================================================================
/**
* @file Unknown_User_Exception.h
*
* Defines the way an exception is reported by a DII request.
*
* @author Portions Copyright 1994-1995 by Sun Microsystems Inc.
* @author Portions Copyright 1997-2003 by Washington University
*/
//=============================================================================
#ifndef TAO_UNKNOWN_USER_EXCEPTION_H
#define TAO_UNKNOWN_USER_EXCEPTION_H
#include /**/ "ace/pre.h"
#include "tao/DynamicInterface/dynamicinterface_export.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/UserException.h"
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace CORBA
{
/**
* @class UnknownUserException
*
* @brief UnknownUserException
*
* When user exceptions are received by a DII invocation the ORB
* is unable to create the exception with the right dynamic type;
* to workaround this problem it throws a
* @c CORBA::UnknownUserException that contains the exception inside
* an Any.
*/
class TAO_DynamicInterface_Export UnknownUserException
: public CORBA::UserException
{
public:
/// Constructor.
UnknownUserException (void);
/// Constructor.
UnknownUserException (CORBA::Any& exception);
/// Copy constructor.
UnknownUserException (const UnknownUserException& e);
/// Destructor.
virtual ~UnknownUserException (void);
/// Return the any containing the user exception.
CORBA::Any& exception (void);
/// To throw an UnknownUserException of this type.
virtual void _raise () const;
virtual CORBA::Exception *_tao_duplicate () const;
virtual void _tao_encode (TAO_OutputCDR &cdr) const;
virtual void _tao_decode (TAO_InputCDR &cdr);
/// Narrow to an UnknowUserException.
static UnknownUserException * _downcast (CORBA::Exception *ex);
static UnknownUserException const * _downcast (CORBA::Exception const * ex);
/// Return the repository ID of the Exception.
virtual const char * _rep_id () const;
// = TAO specific extension.
/// This class has a specific typecode.
virtual CORBA::TypeCode_ptr _tao_type () const;
private:
/// Holder for the actual exception.
CORBA::Any *exception_;
};
// The CORBA::UnknownUserException TypeCode.
extern TAO_DynamicInterface_Export TypeCode_ptr const _tc_UnknownUserException;
} // End CORBA namespace.
TAO_END_VERSIONED_NAMESPACE_DECL
#include /**/ "ace/post.h"
#endif /* TAO_UNKNOWN_USER_EXCEPTION_H */
|