mc_rtc::Configuration::Exception Struct Reference

Exception thrown by this class when something bad occurs. More...

#include <mc_rtc/Configuration.h>

Inheritance diagram for mc_rtc::Configuration::Exception:
Collaboration diagram for mc_rtc::Configuration::Exception:

Public Member Functions

 Exception (const std::string &msg, const Json &v)
 Constructor. More...
 
 Exception (const std::string &msg, const Configuration &c)
 Constructor. More...
 
 ~Exception () noexcept
 
virtual const char * what () const noexcept override
 
void silence () const noexcept
 
const std::string & msg () const noexcept
 

Detailed Description

Exception thrown by this class when something bad occurs.

The exception message is generated when accessed via what() or msg(). It is printed when the exception is deleted and builds a path from the root of the document to the source of the error in order to help the user to find the source of the error. This operation can be expensive. If you do not need the message (e.g. you are attempting various conversions) then you should call silence() to prevent the generation of the message.

Constructor & Destructor Documentation

◆ Exception() [1/2]

mc_rtc::Configuration::Exception::Exception ( const std::string &  msg,
const Json &  v 
)

Constructor.

Parameters
msgException message
vJson value that was the source of the exception

◆ Exception() [2/2]

mc_rtc::Configuration::Exception::Exception ( const std::string &  msg,
const Configuration c 
)
inline

Constructor.

Parameters
msgException message
cConfiguration object that was the source of the exception

◆ ~Exception()

mc_rtc::Configuration::Exception::~Exception ( )
noexcept

Member Function Documentation

◆ msg()

const std::string& mc_rtc::Configuration::Exception::msg ( ) const
noexcept

Returns the error message

◆ silence()

void mc_rtc::Configuration::Exception::silence ( ) const
noexcept

Empty the error message

◆ what()

virtual const char* mc_rtc::Configuration::Exception::what ( ) const
overridevirtualnoexcept

Returns the error message


The documentation for this struct was generated from the following file: