Gyoto
Public Member Functions | Private Attributes
Gyoto::Error Class Reference

Class for thowing exceptions. More...

#include <GyotoError.h>

List of all members.

Public Member Functions

 Error (const std::string m)
 Constructor with an error message.
 Error (const int errcode)
 Constructor with an error code.
 Error (const char *m, const int errcode)
 Constructor with both an error message and an error code.
void Report () const
 Print-out error message on standard error.
int getErrcode () const
 Retrieve error code.
std::string get_message () const
 Retrieve error message for custom handling of the exception.

Private Attributes

const std::string message
const int errcode

Detailed Description

Class for thowing exceptions.

Every Gyoto method should check for possible error conditions and throw adequate Gyoto::Error exceptions. For instance:

if (error_condition) throw Gyoto::Error("Useful error message");

Constructor & Destructor Documentation

Gyoto::Error::Error ( const std::string  m)

Constructor with an error message.

Parameters:
m: pointer (char*) to the error message
Gyoto::Error::Error ( const int  errcode)

Constructor with an error code.

Parameters:
interrcode : error code
Gyoto::Error::Error ( const char *  m,
const int  errcode 
)

Constructor with both an error message and an error code.

Parameters:
m: pointer (char*) to the error message
interrcode : error code

Member Function Documentation

std::string Gyoto::Error::get_message ( ) const

Retrieve error message for custom handling of the exception.

Returns:
char* message : pointer to the error message
int Gyoto::Error::getErrcode ( ) const

Retrieve error code.

Returns:
Error code
void Gyoto::Error::Report ( ) const

Print-out error message on standard error.


Member Data Documentation

const std::string Gyoto::Error::message
private

error message


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