libgta  1.2.1
Read and Write Generic Tagged Array (GTA) files
Public Member Functions | List of all members
gta::exception Class Reference

The exception class. More...

Inheritance diagram for gta::exception:

Public Member Functions

 exception (const char *s, gta::result r)
 Constructor. More...
 
gta::result result () const
 Get the original GTA result. More...
 
int sys_errno () const
 Get the original errno. More...
 
virtual const char * what () const throw ()
 Get a description. More...
 

Detailed Description

The exception class.

The GTA C++ interface reports errors by throwing exceptions. You can use them just like std::exceptions, but you can also query the original gta::result that caused the exception.

Constructor & Destructor Documentation

◆ exception()

gta::exception::exception ( const char *  s,
gta::result  r 
)
inline

Constructor.

Parameters
sThe action that failed.
rThe GTA result.

Member Function Documentation

◆ result()

gta::result gta::exception::result ( ) const
inline

Get the original GTA result.

Returns
The original GTA result.

◆ sys_errno()

int gta::exception::sys_errno ( ) const
inline

Get the original errno.

Returns
The original errno.

The original errno value is relevant if the original GTA result was gta::system_error.

◆ what()

virtual const char* gta::exception::what ( ) const
throw (
)
inlinevirtual

Get a description.

Returns
A description of the exception.

The documentation for this class was generated from the following file: