Class sdm::exception::Exception

Class List > sdm > exception > Exception

This class is the base class for SDMS exceptions. More...

  • #include <exception.hpp>

Inherits the following classes: exception

Inherited by the following classes: sdm::exception::FileNotFoundException, sdm::exception::NotImplementedException, sdm::exception::ParsingException

Public Functions

Type Name
Exception (const std::string & msg_)
Constructor (C++ STL string).
virtual const char * what () const
Returns a pointer to the (constant) error description.

Protected Attributes

Type Name
std::string error_message
Error message.

Detailed Description

SDMS contains some exceptions for its internal usage. To define a new exception in SDMS, you need to add a class that inherite from the class sdm::exception::Exception.

Public Functions Documentation

function Exception

explicit sdm::exception::Exception::Exception (
    const std::string & msg_
) 

Parameters:

  • msg_ The error message

function what

virtual const char * sdm::exception::Exception::what () const

Returns:

A pointer to a const char*. The underlying memory is in possession of the Except object. Callers must not attempt to free the memory.

Protected Attributes Documentation

variable error_message

std::string sdm::exception::Exception::error_message;

The documentation for this class was generated from the following file src/sdm/exception.hpp