ponder 3.2
C++ reflection library
ponder::Error Class Reference

Base class for every exception thrown in Ponder. More...

#include <error.hpp>

+ Inheritance diagram for ponder::Error:

Public Member Functions

virtual ~Error () throw ()
 Destructor.
 
virtual const char * what () const throw ()
 Return a description of the error. More...
 
virtual const char * where () const throw ()
 Return the error location (file + line + function) More...
 

Static Public Member Functions

template<typename T >
static T prepare (T error, const String &file, int line, const String &function)
 Prepare an error to be thrown. More...
 

Detailed Description

Base class for every exception thrown in Ponder.

Member Function Documentation

◆ prepare()

template<typename T >
static T ponder::Error::prepare ( error,
const String &  file,
int  line,
const String &  function 
)
static

Prepare an error to be thrown.

This function is meant for internal use only. It adds the current context of execution (file, line and function) to the given error and returns it.

Parameters
errorError to prepare
fileSource filename
lineLine number in the source file
functionName of the function where the error was thrown
Returns
Modified error, ready to be thrown

◆ what()

virtual const char* ponder::Error::what ( ) const
throw (
)
virtual

Return a description of the error.

Returns
Pointer to a string containing the error message

◆ where()

virtual const char* ponder::Error::where ( ) const
throw (
)
virtual

Return the error location (file + line + function)

Returns
String containing the error location

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