PikaScript
Public Member Functions | Protected Attributes | List of all members
Pika::Exception< S > Class Template Reference

The PikaScript exception class. More...

#include <PikaScript.h>

Inheritance diagram for Pika::Exception< S >:
Inheritance graph
[legend]
Collaboration diagram for Pika::Exception< S >:
Collaboration graph
[legend]

Public Member Functions

 Exception (const S &error)
 Simply constructs the exception with error string error.
 
virtual S getError () const throw ()
 Return the error string for this exception.
 
virtual const char * what () const throw ()
 Returns the error as a null-terminated char string. More...
 
 Exception (const S &error)
 Simply constructs the exception with error string error.
 
virtual S getError () const throw ()
 Return the error string for this exception.
 
virtual const char * what () const throw ()
 Returns the error as a null-terminated char string. More...
 

Protected Attributes

error
 The error string.
 
std::string converted
 Since what() is defined to return a pointer only, we need storage for the converted string within this class too.
 

Detailed Description

template<class S>
class Pika::Exception< S >

The PikaScript exception class.

It is based on std::exception and stores a simple error string of type S. The standard what() is provided, and therefore conversion to a const char* string must be performed in case the S class is not directly compatible. Since what() is defined to return a pointer only, we need storage for the converted string within this class too (Exception::converted).

Definition at line 135 of file PikaScript.h.

Member Function Documentation

template<class S>
virtual const char* Pika::Exception< S >::what ( ) const
throw (
)
inlinevirtual

Returns the error as a null-terminated char string.

Use getError() if you can since it is faster and permits other character types than char.

Definition at line 138 of file PikaScript.h.

template<class S>
virtual const char* Pika::Exception< S >::what ( ) const
throw (
)
inlinevirtual

Returns the error as a null-terminated char string.

Use getError() if you can since it is faster and permits other character types than char.

Definition at line 138 of file PikaScript.h.


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