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
66 std::unique_ptr<Exception>
ice_clone()
const;
103#ifdef ICE_CPP11_MAPPING
105 virtual Exception* ice_cloneImpl()
const = 0;
113 const std::vector<void*> _stackFrames;
114 mutable ::std::string _str;
119#ifdef ICE_CPP11_MAPPING
126template<
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));
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
321 throw static_cast<const E&
>(*this);
337#ifndef ICE_CPP11_COMPILER
344#ifndef ICE_CPP11_MAPPING
378#ifndef ICE_CPP11_MAPPING
385namespace IceUtilInternal
388enum StackTraceImpl { STNone, STDbghelp, STLibbacktrace, STLibbacktracePlus, STBacktrace };
390ICE_API StackTraceImpl stackTraceImpl();
#define ICE_DEPRECATED_API(msg)
Definition Config.h:217
#define ICE_API
Definition Config.h:197
#define ICE_NOEXCEPT
Definition Config.h:128
Helper template for the implementation of Ice::Exception.
Definition Exception.h:161
virtual void ice_throw() const
Throws this exception.
Definition Exception.h:172
ExceptionHelper(const char *file, int line)
Definition Exception.h:168
ExceptionHelper()
Definition Exception.h:164
Abstract base class for all Ice exceptions.
Definition Exception.h:22
int ice_line() const
Returns the line number where this exception was constructed.
virtual std::string ice_id() const =0
Returns the type ID of this exception.
Exception()
Constructs the exception.
virtual void ice_throw() const =0
Throws this exception.
virtual Exception * ice_clone() const =0
Returns a shallow polymorphic copy of this exception.
virtual void ice_print(std::ostream &os) const
Outputs a description of this exception to a stream.
std::string ice_name() const
std::string ice_stackTrace() const
Returns the stack trace at the point this exception was constructed.
const char * ice_file() const
Returns the name of the file where this exception was constructed.
Exception(const char *file, int line)
Constructs the exception.
virtual const char * what() const
Returns a description of this exception.
int error() const
Returns the error number for the failed locking attempt.
virtual std::string ice_id() const
Returns the type ID of this exception.
std::string path() const
Returns the path to the file.
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
virtual ~FileLockException()
virtual FileLockException * ice_clone() const
Returns a shallow polymorphic copy of this exception.
FileLockException(const char *, int, int, const std::string &)
IllegalArgumentException(const char *, int, const std::string &)
std::string reason() const
Provides the reason this exception was thrown.
virtual IllegalArgumentException * ice_clone() const
Returns a shallow polymorphic copy of this exception.
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
IllegalArgumentException(const char *, int)
virtual ~IllegalArgumentException()
virtual std::string ice_id() const
Returns the type ID of this exception.
virtual ~IllegalConversionException()
virtual std::string ice_id() const
Returns the type ID of this exception.
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
IllegalConversionException(const char *, int, const std::string &)
std::string reason() const
Provides the reason this exception was thrown.
virtual IllegalConversionException * ice_clone() const
Returns a shallow polymorphic copy of this exception.
IllegalConversionException(const char *, int)
virtual std::string ice_id() const
Returns the type ID of this exception.
NullHandleException(const char *, int)
virtual NullHandleException * ice_clone() const
Returns a shallow polymorphic copy of this exception.
OptionalNotSetException(const char *, int)
virtual OptionalNotSetException * ice_clone() const
Returns a shallow polymorphic copy of this exception.
virtual std::string ice_id() const
Returns the type ID of this exception.
Helper template for the implementation of SyscallException.
Definition Exception.h:311
SyscallExceptionHelper(const char *file, int line, int errorCode)
Definition Exception.h:314
virtual void ice_throw() const
Throws this exception.
Definition Exception.h:319
virtual ~SyscallException()
virtual SyscallException * ice_clone() const
Returns a shallow polymorphic copy of this exception.
virtual void ice_print(std::ostream &) const
Outputs a description of this exception to a stream.
int error() const
Provides the error number returned by the system call.
SyscallException(const char *, int, int)
virtual std::string ice_id() const
Returns the type ID of this exception.
std::ostream & operator<<(std::ostream &, const Exception &)