class SCATMECH_exception


The class SCATMECH_exception is provided to enable exception handling. Any fatal error by any SCATMECH function will throw an exception of type SCATMECH_exception. Since it inherits the class std::exception, any program that catches exceptions of type reference to std::exception will catch exceptions of type SCATMECH_exception. It is generally recommended that one executes all SCATMECH code in a try loop, such as

try {
    // ... Codes containing SCATMECH routines
}
catch(SCATMECH_exception& e)
{
    cerr << "SCATMECH error:" << e.what() << endl;
}

Include file:

#include "scatmech.h"

See also:

SCATMECH Home

Definition of public elements:

class SCATMECH_exception : public std::exception
{
    SCATMECH_exception(const std::string& m);
    ~SCATMECH_exception() throw() {};
    virtual const char *what() const throw();
};


virtual const char* what()

This function returns a pointer to a string containing the error message.

Top of Page


For More Information

SCATMECH Technical Information and Questions
Sensor Science Division Home Page
Sensor Science Division Inquiries
Website Comments

Current SCATMECH version: 7.22 (April 2021)