Ice 3.7 C++11 API Reference
|
Go to the documentation of this file.
5 #ifndef ICE_UTIL_EXCEPTION_H
6 #define ICE_UTIL_EXCEPTION_H
37 #ifndef ICE_CPP11_COMPILER
47 virtual std::string
ice_id()
const = 0;
60 #ifdef ICE_CPP11_MAPPING
75 std::
string ice_name() const;
103 #ifdef ICE_CPP11_MAPPING
104 virtual Exception* ice_cloneImpl()
const = 0;
113 const std::vector<void*> _stackFrames;
114 mutable ::std::string _str;
119 #ifdef ICE_CPP11_MAPPING
126 template<
typename E,
typename B = Exception>
135 return std::unique_ptr<E>(
static_cast<E*
>(ice_cloneImpl()));
140 throw static_cast<const E&
>(*this);
146 virtual Exception* ice_cloneImpl()
const override
148 return new E(
static_cast<const E&
>(*
this));
153 #else // C++98 mapping
168 ExceptionHelper(
const char* file,
int line) :
Exception(file, line)
174 throw static_cast<const E&
>(*this);
192 #ifndef ICE_CPP11_MAPPING
210 #ifndef ICE_CPP11_COMPILER
217 #ifndef ICE_CPP11_MAPPING
229 const std::string _reason;
243 #ifndef ICE_CPP11_COMPILER
250 #ifndef ICE_CPP11_MAPPING
262 const std::string _reason;
275 #ifndef ICE_CPP11_COMPILER
282 #ifndef ICE_CPP11_MAPPING
297 #ifdef ICE_CPP11_MAPPING
302 #else // C++98 mapping
321 throw static_cast<const E&
>(*this);
337 #ifndef ICE_CPP11_COMPILER
344 #ifndef ICE_CPP11_MAPPING
378 #ifndef ICE_CPP11_MAPPING
385 namespace IceUtilInternal
388 enum StackTraceImpl { STNone, STDbghelp, STLibbacktrace, STLibbacktracePlus, STBacktrace };
390 ICE_API StackTraceImpl stackTraceImpl();
std::ostream & operator<<(std::ostream &, const Exception &)
This exception indicates the failure of a string conversion.
Definition: Exception.h:237
int error() const
Provides the error number returned by the system call.
virtual std::string ice_id() const
Returns the type ID of this exception.
virtual const char * what() const
Returns a description of this exception.
NullHandleException(const char *, int)
#define ICE_DEPRECATED_API(msg)
Definition: Config.h:217
This exception indicates an IceUtil::Optional is not set.
Definition: Exception.h:372
virtual std::string ice_id() const
Returns the type ID of this exception.
IceUtil::Exception Exception
Definition: Exception.h:20
const char * ice_file() const
Returns the name of the file where this exception was constructed.
virtual ~IllegalConversionException()
#define ICE_NOEXCEPT
Definition: Config.h:128
std::string ice_stackTrace() const
Returns the stack trace at the point this exception was constructed.
IllegalConversionException(const char *, int)
Definition: Optional.h:1095
virtual void ice_print(std::ostream &os) const
Outputs a description of this exception to a stream.
#define ICE_API
Definition: Config.h:197
This exception indicates an attempt to dereference a null IceUtil::Handle or IceInternal::Handle.
Definition: Exception.h:186
virtual std::string ice_id() const
Returns the type ID of this exception.
IllegalConversionException(const char *, int, const std::string &)
OptionalNotSetException(const char *, int)
std::string reason() const
Provides the reason this exception was thrown.
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
int error() const
Returns the error number for the failed locking attempt.
std::string reason() const
Provides the reason this exception was thrown.
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
virtual ~FileLockException()
virtual ~IllegalArgumentException()
virtual std::string ice_id() const
Returns the type ID of this exception.
std::string path() const
Returns the path to the file.
int ice_line() const
Returns the line number where this exception was constructed.
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
virtual void ice_throw() const override
Throws this exception.
Definition: Exception.h:138
This exception indicates the failure to lock a file.
Definition: Exception.h:332
Abstract base class for all Ice exceptions.
Definition: Exception.h:22
FileLockException(const char *, int, int, const std::string &)
SyscallException(const char *, int, int)
IllegalArgumentException(const char *, int)
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
This exception indicates that a function was called with an illegal parameter value.
Definition: Exception.h:204
Exception(const char *file, int line)
Constructs the exception.
IllegalArgumentException(const char *, int, const std::string &)
virtual std::string ice_id() const =0
Returns the type ID of this exception.
ExceptionHelper< E, SyscallException > SyscallExceptionHelper
Definition: Exception.h:300
virtual ~SyscallException()
Helper template for the implementation of Ice::Exception.
Definition: Exception.h:128
std::unique_ptr< Exception > ice_clone() const
Returns a shallow polymorphic copy of this exception.
virtual std::string ice_id() const
Returns the type ID of this exception.
This exception indicates the failure of a system call.
Definition: Exception.h:270
std::unique_ptr< E > ice_clone() const
Definition: Exception.h:133
virtual void ice_throw() const =0
Throws this exception.
Exception()
Constructs the exception.
virtual std::string ice_id() const
Returns the type ID of this exception.