GA Exception. More...

#include <rga.h>

Inheritance diagram for RGAException:
[legend]
Collaboration diagram for RGAException:
[legend]

Public Member Functions

 RGAException (const RString &type, const RString &str)
 
 RGAException (const RString &type, const RString &func, long where, const RString &str)
 
RString GetType (void) const
 

Protected Attributes

RString Type
 

Detailed Description

GA Exception.

The RGAException class provides an exception generated by the GA.

Constructor & Destructor Documentation

RGAException ( const RString type,
const RString str 
)

Construct a GA exception with a particular message.

Parameters
typeType of the exception.
strMessage of the error.
RGAException ( const RString type,
const RString func,
long  where,
const RString str 
)

Construct a GA exception with the message "func [where]: str". A typical use is:

if(!ptr)
throw RGAException("Mutation",__PRETTY_FUNCTION__,__LINE__,"ptr cannot be a null pointer");
See also
The mThrowRGAException2 macro.
Parameters
typeType of the exception.
funcFunction producing the error.
whereLine position of the error.
strMessage of the error.

Member Function Documentation

RString GetType ( void  ) const

Get the type of the exception.

Member Data Documentation

RString Type
protected

Type of the exception.