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
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));
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
319 virtual void ice_throw()
const
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:128
virtual void ice_throw() const override
Throws this exception.
Definition Exception.h:138
std::unique_ptr< E > ice_clone() const
Definition Exception.h:133
Abstract base class for all Ice exceptions.
Definition Exception.h:22
std::unique_ptr< Exception > ice_clone() const
Returns a shallow polymorphic copy of this exception.
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 void ice_print(std::ostream &os) const
Outputs a description of this exception to a stream.
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()
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 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.
IllegalConversionException(const char *, int)
virtual std::string ice_id() const
Returns the type ID of this exception.
NullHandleException(const char *, int)
OptionalNotSetException(const char *, int)
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
virtual ~SyscallException()
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.
Definition Optional.h:1095
ExceptionHelper< E, SyscallException > SyscallExceptionHelper
Definition Exception.h:300
std::ostream & operator<<(std::ostream &, const Exception &)