MAST3
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
MAST::Exceptions::ExceptionBase Class Reference

Detailed Description

Definition at line 29 of file exceptions.hpp.

#include <exceptions.hpp>

Inheritance diagram for MAST::Exceptions::ExceptionBase:

Public Member Functions

 ExceptionBase (const std::string &cond, const std::string &val_msg, const std::string &msg, const std::string &file, const int line)
 
virtual ~ExceptionBase ()
 
void throw_error ()
 

Protected Attributes

const std::string _cond
 
const std::string _file
 
const int _line
 
const std::string _msg
 
const std::string _val_msg
 

Constructor & Destructor Documentation

◆ ExceptionBase()

MAST::Exceptions::ExceptionBase::ExceptionBase ( const std::string &  cond,
const std::string &  val_msg,
const std::string &  msg,
const std::string &  file,
const int  line 
)
inline

Definition at line 32 of file exceptions.hpp.

36  :
37  _cond (cond),
38  _val_msg (val_msg),
39  _msg (msg),
40  _file (file),
41  _line (line)
42  { }

◆ ~ExceptionBase()

virtual MAST::Exceptions::ExceptionBase::~ExceptionBase ( )
inlinevirtual

Definition at line 44 of file exceptions.hpp.

44 { }

Member Function Documentation

◆ throw_error()

void MAST::Exceptions::ExceptionBase::throw_error ( )
inline

Definition at line 46 of file exceptions.hpp.

46  {
47 
48  std::cerr
49  << "Condition Violated: "
50  << _cond << std::endl
51  << _val_msg << std::endl
52  << _msg << std::endl
53  << _file << " : " << _line << std::endl;
54 
55  throw 1;
56  }

Member Data Documentation

◆ _cond

const std::string MAST::Exceptions::ExceptionBase::_cond
protected

Definition at line 60 of file exceptions.hpp.

◆ _file

const std::string MAST::Exceptions::ExceptionBase::_file
protected

Definition at line 63 of file exceptions.hpp.

◆ _line

const int MAST::Exceptions::ExceptionBase::_line
protected

Definition at line 64 of file exceptions.hpp.

◆ _msg

const std::string MAST::Exceptions::ExceptionBase::_msg
protected

Definition at line 62 of file exceptions.hpp.

◆ _val_msg

const std::string MAST::Exceptions::ExceptionBase::_val_msg
protected

Definition at line 61 of file exceptions.hpp.


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