gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::invalid_point_exception Class Reference

Gambit invalid point exception class. More...

#include <exceptions.hpp>

Inheritance diagram for Gambit::invalid_point_exception:
Collaboration diagram for Gambit::invalid_point_exception:

Public Member Functions

 invalid_point_exception ()
 Constructor. More...
 
void set_thrower (functor *)
 Set the pointer to the functor that threw the invalid point exception. More...
 
functorthrower ()
 Retrieve pointer to the functor that threw the invalid point exception. More...
 
virtual void raise (const std::string &)
 Raise the exception, i.e. throw it. Exact override of base method. More...
 
virtual void raise (const std::string &, int code)
 Raise the exception, i.e. throw it with a message and code. More...
 
- Public Member Functions inherited from Gambit::special_exception
 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...
 

Private Member Functions

void abort_here_and_now ()
 Cause the code to print the exception and abort. More...
 

Private Attributes

functormyThrower
 The functor responsible for throwing this exception. More...
 

Additional Inherited Members

- Public Attributes inherited from Gambit::special_exception
int invalidcode
 Integer code used for exceptions. More...
 
- Protected Attributes inherited from Gambit::special_exception
std::string myMessage
 The message passed when this exception is raised. More...
 

Detailed Description

Gambit invalid point exception class.

Definition at line 229 of file exceptions.hpp.

Constructor & Destructor Documentation

◆ invalid_point_exception()

Gambit::invalid_point_exception::invalid_point_exception ( )

Constructor.

Gambit invalid point exception class methods.

Constructor

Definition at line 398 of file exceptions.cpp.

398 : special_exception("GAMBIT invalid point."), myThrower(NULL) {}
special_exception(const char *)
Constructor.
Definition: exceptions.cpp:363
functor * myThrower
The functor responsible for throwing this exception.
Definition: exceptions.hpp:235

Member Function Documentation

◆ abort_here_and_now()

void Gambit::invalid_point_exception::abort_here_and_now ( )
private

Cause the code to print the exception and abort.

Definition at line 456 of file exceptions.cpp.

References Gambit::special_exception::message(), and Gambit::special_exception::what().

Referenced by raise().

457  {
458  #pragma omp critical (GAMBIT_invalid_pt_exception)
459  {
460  cerr << endl << " \033[00;31;1mFATAL ERROR\033[00m" << endl << endl;
461  cerr << "An invalid_point exception is fatal inside an OpenMP block. " << endl << what() << endl << message() << endl;
462  #ifdef WITH_MPI
463  GMPI::Comm().Abort();
464  #else
465  abort();
466  #endif
467  }
468  }
virtual const char * what() const
Retrieve the identity of the exception.
Definition: exceptions.cpp:366
std::string message()
Retrieve the message that this exception was raised with.
Definition: exceptions.cpp:374
Here is the call graph for this function:
Here is the caller graph for this function:

◆ raise() [1/2]

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

Raise the exception, i.e. throw it. Exact override of base method.

Raise the invalid point exception, i.e throw it with a message and a default code.

Reimplemented from Gambit::special_exception.

Definition at line 422 of file exceptions.cpp.

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), Gambit::DecayBit::all_decays(), Gambit::ColliderBit::calc_LHC_LogLikes(), Gambit::ColliderBit::calc_susy_spectrum_scan_guide(), Gambit::Piped_invalid_point::check(), Gambit::SpecBit::check_EW_stability_ScalarSingletDM_Z3(), Gambit::Spectrum::check_mass_cuts(), Gambit::SpecBit::check_perturb_MDM(), Gambit::SpecBit::check_perturb_min_lambda(), Gambit::DecayBit::check_width(), Gambit::DecayBit::compute_SM_higgs_decays(), Gambit::DarkBit::DarkMatter_ID_MSSM(), Gambit::DarkBit::DarkMatterConj_ID_MSSM(), Gambit::slhahelp::family_state_closest_to_mass_es(), Gambit::slhahelp::family_state_mix_matrix(), Gambit::SpecBit::FH_AllHiggsMasses(), Gambit::SpecBit::FH_Couplings(), Gambit::ColliderBit::FH_HiggsProd(), Gambit::SpecBit::FH_MSSMMasses(), Gambit::PrecisionBit::FH_PrecisionObs(), Gambit::SpecBit::find_non_perturb_scale_MDM(), Gambit::slhahelp::gauge_es_from_mass_es(), Gambit::SpecBit::get_DiracSingletDM_Z2_spectrum(), Gambit::SpecBit::get_MajoranaSingletDM_Z2_spectrum(), Gambit::SpecBit::get_MSSM_spectrum_from_postprocessor(), Gambit::SpecBit::get_MSSM_spectrum_from_SLHAfile(), Gambit::SpecBit::get_MSSM_spectrum_from_SLHAstruct(), Gambit::SpecBit::get_MSSM_spectrum_SPheno(), Gambit::SpecBit::get_ScalarSingletDM_Z3_spectrum(), Gambit::ColliderBit::GET_SPECIFIC_PYTHIA_SLHA(), Gambit::SpecBit::get_VectorSingletDM_Z2_spectrum(), Gambit::PrecisionBit::GM2C_SUSY(), Gambit::Utils::integrate_cquad(), Gambit::slhahelp::mass_es_closest_to_family(), Gambit::slhahelp::mass_es_from_gauge_es(), Gambit::module_functor_common::notifyOfInvalidation(), Gambit::DarkBit::RD_annrate_DS5prep_func(), Gambit::DarkBit::RD_annrate_DSprep_MSSM_func(), Gambit::DarkBit::RD_oh2_DarkSUSY_DS5(), Gambit::DarkBit::RD_oh2_DS5_general(), Gambit::DarkBit::RD_oh2_DS_general(), Gambit::DarkBit::RD_spectrum_MSSM(), Gambit::DecayBit::Ref_SM_Higgs_decays_table(), Gambit::SpecBit::run_FS_spectrum_generator(), Gambit::DarkBit::TH_ProcessCatalog_DS5_MSSM(), Gambit::DarkBit::TH_ProcessCatalog_DS_MSSM(), daFunk::throwError(), Gambit::PrecisionBit::update_H_masses(), and Gambit::PrecisionBit::update_W_masses().

423  {
424  // Default code is 1
425  raise(msg, 1);
426  }
Here is the caller graph for this function:

◆ raise() [2/2]

void Gambit::invalid_point_exception::raise ( const std::string &  msg,
int  code 
)
virtual

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

Raise the invalid point exception, i.e. throw it with a message and a code.

Definition at line 429 of file exceptions.cpp.

References abort_here_and_now(), Gambit::special_exception::invalidcode, and Gambit::special_exception::myMessage.

430  {
431  if (omp_get_level()==0) // If not in an OpenMP parallel block, throw onwards
432  {
433  #pragma omp critical (GAMBIT_exception)
434  {
435  myMessage = msg;
436  }
437  invalidcode = mycode;
438  throw(*this);
439  }
440  else
441  {
442  std::ostringstream full_msg;
443  full_msg << "Sorry, you cannot raise an invalid point exception inside an OpenMP block." << endl
444  << "Please use piped_invalid_point.request() in your block, then check it with " << endl
445  << "piped_invalid_point.check() to raise the exception outside the block." << endl
446  << "Message: " << msg;
447  #pragma omp critical (GAMBIT_exception)
448  {
449  myMessage = full_msg.str();
450  }
451  abort_here_and_now(); // If in an OpenMP parallel block, just abort immediately.
452  }
453  }
int invalidcode
Integer code used for exceptions.
Definition: exceptions.hpp:214
std::string myMessage
The message passed when this exception is raised.
Definition: exceptions.hpp:224
void abort_here_and_now()
Cause the code to print the exception and abort.
Definition: exceptions.cpp:456
Here is the call graph for this function:

◆ set_thrower()

void Gambit::invalid_point_exception::set_thrower ( functor thrown_from)

Set the pointer to the functor that threw the invalid point exception.

Definition at line 401 of file exceptions.cpp.

References myThrower.

Referenced by Gambit::module_functor_common::acknowledgeInvalidation().

402  {
403  #pragma omp critical (myThrower)
404  {
405  myThrower = thrown_from;
406  }
407  }
functor * myThrower
The functor responsible for throwing this exception.
Definition: exceptions.hpp:235
Here is the caller graph for this function:

◆ thrower()

functor * Gambit::invalid_point_exception::thrower ( )

Retrieve pointer to the functor that threw the invalid point exception.

Definition at line 410 of file exceptions.cpp.

References LOCAL_INFO, myThrower, and Gambit::utils_error().

Referenced by main(), and Gambit::Likelihood_Container::main().

411  {
412  functor* temp;
413  #pragma omp critical (myThrower)
414  {
415  temp = myThrower;
416  }
417  if (temp == NULL) utils_error().raise(LOCAL_INFO, "No throwing functor in invalid_point_exception.");
418  return temp;
419  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
functor * myThrower
The functor responsible for throwing this exception.
Definition: exceptions.hpp:235
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ myThrower

functor* Gambit::invalid_point_exception::myThrower
private

The functor responsible for throwing this exception.

Definition at line 235 of file exceptions.hpp.

Referenced by set_thrower(), and thrower().


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