Ice 3.7 C++11 API Reference
Exception.h
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 #ifndef ICE_EXCEPTION_H
6 #define ICE_EXCEPTION_H
7 
8 #include <IceUtil/Exception.h>
9 #include <Ice/Config.h>
10 #include <Ice/Format.h>
11 #include <Ice/Handle.h>
12 #include <Ice/ObjectF.h>
13 #include <Ice/ValueF.h>
14 #include <Ice/SlicedDataF.h>
15 
16 namespace Ice
17 {
18 
19 class OutputStream;
20 class InputStream;
21 
23 
29 {
30 public:
31 
37  LocalException(const char* file, int line);
38 
39 #ifdef ICE_CPP11_COMPILER
40  LocalException(const LocalException&) = default;
41  virtual ~LocalException();
42 #else
43  virtual ~LocalException() throw();
44 #endif
45 
50 #ifdef ICE_CPP11_MAPPING
51  std::unique_ptr<LocalException> ice_clone() const;
52 #else
53  virtual LocalException* ice_clone() const = 0;
54 #endif
55 
60  static const std::string& ice_staticId();
61 };
62 
68 {
69 public:
70 
75 #ifdef ICE_CPP11_MAPPING
76  std::unique_ptr<UserException> ice_clone() const;
77 #else
78  virtual UserException* ice_clone() const = 0;
79 #endif
80  virtual Ice::SlicedDataPtr ice_getSlicedData() const;
81 
86  static const std::string& ice_staticId();
87 
89  virtual void _write(::Ice::OutputStream*) const;
90  virtual void _read(::Ice::InputStream*);
91 
92  virtual bool _usesClasses() const;
94 
95 protected:
96 
98  virtual void _writeImpl(::Ice::OutputStream*) const {}
99  virtual void _readImpl(::Ice::InputStream*) {}
101 };
102 
111 {
112 public:
113 
119  SystemException(const char* file, int line);
120 
121 #ifdef ICE_CPP11_COMPILER
122  SystemException(const SystemException&) = default;
123  virtual ~SystemException();
124 #else
125  virtual ~SystemException() throw();
126 #endif
127 
132 #ifdef ICE_CPP11_MAPPING
133  std::unique_ptr<SystemException> ice_clone() const;
134 #else
135  virtual SystemException* ice_clone() const = 0;
136 #endif
137 
142  static const std::string& ice_staticId();
143 };
144 
145 }
146 
147 namespace IceInternal
148 {
149 
150 namespace Ex
151 {
152 
153 ICE_API void throwUOE(const ::std::string&, const ::Ice::ValuePtr&);
154 ICE_API void throwMemoryLimitException(const char*, int, size_t, size_t);
155 ICE_API void throwMarshalException(const char*, int, const std::string&);
156 
157 }
158 
159 }
160 
161 #endif
Ice::LocalException::ice_staticId
static const std::string & ice_staticId()
Obtains the Slice type ID of this exception.
Ice::InputStream
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition: InputStream.h:50
Ice::LocalException::~LocalException
virtual ~LocalException()
Ice::UserException::ice_staticId
static const std::string & ice_staticId()
Obtains the Slice type ID of this exception.
Ice::UserException::ice_getSlicedData
virtual Ice::SlicedDataPtr ice_getSlicedData() const
Handle.h
Ice::Exception
IceUtil::Exception Exception
Definition: Exception.h:20
Format.h
Ice::UserException::ice_clone
std::unique_ptr< UserException > ice_clone() const
Polymorphically clones this exception.
ICE_API
#define ICE_API
Definition: Config.h:197
Ice::LocalException::LocalException
LocalException(const char *file, int line)
The file and line number are required for all local exceptions.
Ice::SystemException::ice_clone
std::unique_ptr< SystemException > ice_clone() const
Polymorphically clones this exception.
Ice::SystemException::SystemException
SystemException(const char *file, int line)
The file and line number are required for all local exceptions.
SlicedDataF.h
Exception.h
Ice::SystemException::~SystemException
virtual ~SystemException()
Ice::OutputStream
Interface for output streams used to create a sequence of bytes from Slice types.
Definition: OutputStream.h:28
Config.h
ObjectF.h
IceUtil::Exception
Abstract base class for all Ice exceptions.
Definition: Exception.h:22
Ice
Definition: BuiltinSequences.h:56
Ice::SystemException
Base class for all Ice system exceptions.
Definition: Exception.h:111
Ice::LocalException
Base class for all Ice run-time exceptions.
Definition: Exception.h:29
Ice::LocalException::ice_clone
std::unique_ptr< LocalException > ice_clone() const
Polymorphically clones this exception.
ValueF.h
Ice::SystemException::ice_staticId
static const std::string & ice_staticId()
Obtains the Slice type ID of this exception.
Ice::UserException
Base class for all Ice user exceptions.
Definition: Exception.h:68