gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool

GAMBIT special exception class. Not logged, meant for always catching. More...

#include <exceptions.hpp>

Inheritance diagram for Gambit::special_exception:
Collaboration diagram for Gambit::special_exception:

Public Member Functions

 special_exception (const char *)
 Constructor. More...
 
virtual ~special_exception () throw ()
 Destructor. More...
 
virtual const char * what () const throw ()
 Retrieve the identity of the exception. More...
 
std::string message ()
 Retrieve the message that this exception was raised with. More...
 
virtual void raise (const std::string &)
 Raise the exception, i.e. throw it. More...
 

Protected Attributes

std::string myMessage
 The message passed when this exception is raised. More...
 

Private Attributes

const char * myWhat
 What this exception is (for returning with what method). More...
 

Detailed Description

GAMBIT special exception class. Not logged, meant for always catching.

Definition at line 194 of file exceptions.hpp.

Constructor & Destructor Documentation

◆ special_exception()

Gambit::special_exception::special_exception ( const char *  what)

Constructor.

GAMBIT special exception class methods.

Constructor

Definition at line 363 of file exceptions.cpp.

363 : myWhat(what), myMessage("") {}
std::string myMessage
The message passed when this exception is raised.
Definition: exceptions.hpp:221
virtual const char * what() const
Retrieve the identity of the exception.
Definition: exceptions.cpp:366
const char * myWhat
What this exception is (for returning with what method).
Definition: exceptions.hpp:216

◆ ~special_exception()

virtual Gambit::special_exception::~special_exception ( )
throw (
)
inlinevirtual

Destructor.

Definition at line 202 of file exceptions.hpp.

202 {}

Member Function Documentation

◆ message()

std::string Gambit::special_exception::message ( )

Retrieve the message that this exception was raised with.

Definition at line 374 of file exceptions.cpp.

References myMessage.

Referenced by Gambit::invalid_point_exception::abort_here_and_now(), Gambit::Piped_invalid_point::check(), main(), Gambit::Likelihood_Container::main(), and Gambit::Piped_invalid_point::request().

375  {
376  std::string temp;
377  #pragma omp critical (GAMBIT_exception)
378  {
379  temp = myMessage;
380  }
381  return temp;
382  }
std::string myMessage
The message passed when this exception is raised.
Definition: exceptions.hpp:221
Here is the caller graph for this function:

◆ raise()

void Gambit::special_exception::raise ( const std::string &  msg)
virtual

Raise the exception, i.e. throw it.

Raise the exception, i.e. throw it with a message.

Reimplemented in Gambit::invalid_point_exception.

Definition at line 385 of file exceptions.cpp.

References myMessage.

386  {
387  #pragma omp critical (GAMBIT_exception)
388  {
389  myMessage = msg;
390  }
391  throw(*this);
392  }
std::string myMessage
The message passed when this exception is raised.
Definition: exceptions.hpp:221

◆ what()

const char * Gambit::special_exception::what ( ) const
throw (
)
virtual

Retrieve the identity of the exception.

Definition at line 366 of file exceptions.cpp.

References myWhat.

Referenced by Gambit::invalid_point_exception::abort_here_and_now().

367  {
368  const char* temp;
369  temp = myWhat;
370  return temp;
371  }
const char * myWhat
What this exception is (for returning with what method).
Definition: exceptions.hpp:216
Here is the caller graph for this function:

Member Data Documentation

◆ myMessage

std::string Gambit::special_exception::myMessage
protected

The message passed when this exception is raised.

Definition at line 221 of file exceptions.hpp.

Referenced by message(), raise(), and Gambit::invalid_point_exception::raise().

◆ myWhat

const char* Gambit::special_exception::myWhat
private

What this exception is (for returning with what method).

Definition at line 216 of file exceptions.hpp.

Referenced by what().


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