Acoustic Research Tool (ART)  v0.10
ARTerror Struct Reference

For errors that make the continuation of the programme impossible an object of this class is thrown.

It contains a description of the error and the name of the function where it occured. Some error messages are addressed at programmers, some at end users.

Public Member Functions

 ARTerror (std::string in, std::string des, std::string s1="", std::string s2="", std::string s3="")
 The constructor of an ARTerror object.
std::string GetErrorMessage ()
std::string GetErrorString ()

Public Attributes

int test
std::string inFunction
std::string description

Constructor & Destructor Documentation

ARTerror::ARTerror ( std::string  in,
std::string  des,
std::string  s1 = "",
std::string  s2 = "",
std::string  s3 = "" 

The constructor of an ARTerror object.

inThe name of the function the error occures in. The name should also specify the class.
desThe description of the error. If variable string parts should be included in the description, use the placeholders "%s1", "%s2" and "%s3". If the constructor is called like this
ARTerror e = new ARTerror("myfunction()","The variable %s1 of element %s2 is NULL", "Length", "Cylinder1");
The call will return "The variable Length of element Cylinder1 is NULL"
s1The string that will replace the placeholder s1 in the des. (optional)
s2The string that will replace the placeholder s2 in the des. (optional)
s3The string that will replace the placeholder s3 in the des. (optional)

Member Function Documentation

std::string ARTerror::GetErrorMessage ( )
a message with function name
std::string ARTerror::GetErrorString ( )
only the error string, no function name