gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
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. 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

- 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 226 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:232

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 448 of file exceptions.cpp.

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

Referenced by raise().

449  {
450  #pragma omp critical (GAMBIT_invalid_pt_exception)
451  {
452  cerr << endl << " \033[00;31;1mFATAL ERROR\033[00m" << endl << endl;
453  cerr << "An invalid_point exception is fatal inside an OpenMP block. " << endl << what() << endl << message() << endl;
454  #ifdef WITH_MPI
455  GMPI::Comm().Abort();
456  #else
457  abort();
458  #endif
459  }
460  }
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()

void Gambit::invalid_point_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 from Gambit::special_exception.

Definition at line 422 of file exceptions.cpp.

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

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), Gambit::DecayBit::all_decays(), Gambit::ColliderBit::calc_LHC_LogLikes(), 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::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_SLHAfile(), Gambit::SpecBit::get_MSSM_spectrum_from_SLHAstruct(), Gambit::SpecBit::get_MSSM_spectrum_SPheno(), Gambit::SpecBit::get_ScalarSingletDM_Z3_spectrum(), Gambit::SpecBit::get_VectorSingletDM_Z2_spectrum(), Gambit::ColliderBit::getColliderPythia(), 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  if (omp_get_level()==0) // If not in an OpenMP parallel block, throw onwards
425  {
426  #pragma omp critical (GAMBIT_exception)
427  {
428  myMessage = msg;
429  }
430  throw(*this);
431  }
432  else
433  {
434  std::ostringstream full_msg;
435  full_msg << "Sorry, you cannot raise an invalid point exception inside an OpenMP block." << endl
436  << "Please use piped_invalid_point.request() in your block, then check it with " << endl
437  << "piped_invalid_point.check() to raise the exception outside the block." << endl
438  << "Message: " << msg;
439  #pragma omp critical (GAMBIT_exception)
440  {
441  myMessage = full_msg.str();
442  }
443  abort_here_and_now(); // If in an OpenMP parallel block, just abort immediately.
444  }
445  }
std::string myMessage
The message passed when this exception is raised.
Definition: exceptions.hpp:221
void abort_here_and_now()
Cause the code to print the exception and abort.
Definition: exceptions.cpp:448
Here is the call graph for this function:
Here is the caller 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:232
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:232
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 232 of file exceptions.hpp.

Referenced by set_thrower(), and thrower().


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