42 #ifndef Alembic_Util_Exception_h
43 #define Alembic_Util_Exception_h
57 class Exception :
public std::string,
public std::exception
62 Exception() throw() : std::
string( "" ), std::exception() {}
66 explicit Exception(
const std::string &str )
throw()
67 : std::string( str ), std::exception() {}
72 : std::string( exc.c_str() ), std::exception() {}
80 virtual const char *
what()
const throw() {
return c_str(); }
87 #define ABC_THROW( TEXT ) \
90 std::stringstream sstr; \
92 Alembic::Util::Exception exc( sstr.str() ); \
100 #define ALEMBIC_THROW( TEXT ) ABC_THROW( TEXT )
virtual ~Exception()
Destructor is empty, but virtual to support polymorphic destruction of data in any derived classes...
Exception(const Exception &exc)
Copies exception. ...
Exception(const std::string &str)
Creates exception with an explicit message string. ...
Exception()
default constructor creates exception with empty message string
virtual const char * what() const
Inherited from std::exception, this returns a non-modifiable character string describing the nature o...
Base class for all exceptions in the Alembic libraries. Derived from both std::exception and std::str...
OIIO_UTIL_API const char * c_str(string_view str)
#define ALEMBIC_VERSION_NS