gta::exception Class Reference

The exception class. More...

Inherits std::exception.

List of all members.

Public Member Functions

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

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

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

Constructor.

Parameters:
s The action that failed.
r The GTA result.

Member Function Documentation

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

Get the original GTA result.

Returns:
The original GTA result.
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.

virtual const char* gta::exception::what (  )  const throw () [inline, virtual]

Get a description.

Returns:
A description of the exception.

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

Generated on 29 Jan 2013 for libgta by  doxygen 1.6.1