Skip to content

scram::Error

The Error class is the base class for all exceptions specific to the SCRAM code. More...

#include <error.h>

Inherits from std::exception, boost::exception

Inherited by scram::DLError, scram::IOError, scram::IllegalOperation, scram::LogicError, scram::SettingsError, scram::VersionError, scram::mef::ValidityError, scram::xml::Error

Public Functions

Name
Error(std::string msg)<br>Constructs a new error with a provided message.
const char *what() const

Detailed Description

cpp
class scram::Error;

The Error class is the base class for all exceptions specific to the SCRAM code.

Note: The copy constructor is not noexcept as required by std::exception. However, this class may only throw std::bad_alloc upon copy, which may be produced anyway even if the copy constructor were noexcept.

Public Functions Documentation

function Error

cpp
inline explicit Error(
    std::string msg
)

Constructs a new error with a provided message.

Parameters:

  • msg The message to be passed with this error.

function what

cpp
inline const char * what() const

Return: The formatted error message to be printed.


Updated on 2025-11-11 at 16:51:07 +0000