BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions
BDSException Class Reference

General exception with possible name of object and message. More...

#include <BDSException.hh>

Inheritance diagram for BDSException:
Inheritance graph
Collaboration diagram for BDSException:
Collaboration graph

Public Member Functions

 BDSException (const std::string &messageIn) noexcept
 
 BDSException (const std::string &nameIn, const std::string &messageIn) noexcept
 
 BDSException (const BDSException &other) noexcept
 
const char * what () const noexcept override
 Override message in std::exception. More...
 
void SetName (const std::string &nameIn)
 Allow setting of name later. More...
 
void AppendToMessage (const std::string &messageIn)
 

Data Fields

std::string name
 Data to print. More...
 
std::string message
 Data to print. More...
 
std::string completeString
 Data to print. More...
 

Detailed Description

General exception with possible name of object and message.

Provide optional name of object the message is associated with. This Can be appended later with SetName() function.

Author
Laurie Nevay

Definition at line 34 of file BDSException.hh.

Constructor & Destructor Documentation

◆ BDSException() [1/3]

BDSException::BDSException ( const std::string &  messageIn)
inlineexplicitnoexcept

Definition at line 37 of file BDSException.hh.

◆ BDSException() [2/3]

BDSException::BDSException ( const std::string &  nameIn,
const std::string &  messageIn 
)
inlinenoexcept

Definition at line 42 of file BDSException.hh.

◆ BDSException() [3/3]

BDSException::BDSException ( const BDSException other)
inlinenoexcept

Definition at line 47 of file BDSException.hh.

◆ ~BDSException()

virtual BDSException::~BDSException ( )
inlinevirtual

Definition at line 52 of file BDSException.hh.

Member Function Documentation

◆ AppendToMessage()

void BDSException::AppendToMessage ( const std::string &  messageIn)
inline

Definition at line 60 of file BDSException.hh.

◆ SetName()

void BDSException::SetName ( const std::string &  nameIn)
inline

Allow setting of name later.

Definition at line 59 of file BDSException.hh.

References completeString, message, and name.

Referenced by BDSApertureInfo::CheckApertureInfo().

Here is the caller graph for this function:

◆ what()

const char * BDSException::what ( ) const
inlineoverridenoexcept

Override message in std::exception.

Definition at line 55 of file BDSException.hh.

References completeString, message, and name.

Referenced by BDSScorerInfo::BDSScorerInfo(), BDSIMLink::BeamOn(), BDSLinkPrimaryGeneratorAction::GeneratePrimaries(), and BDSPrimaryGeneratorAction::GeneratePrimaries().

Here is the caller graph for this function:

Field Documentation

◆ completeString

std::string BDSException::completeString

Data to print.

Definition at line 65 of file BDSException.hh.

Referenced by SetName(), and what().

◆ message

std::string BDSException::message

Data to print.

Definition at line 64 of file BDSException.hh.

Referenced by SetName(), and what().

◆ name

std::string BDSException::name

Data to print.

Definition at line 63 of file BDSException.hh.

Referenced by SetName(), and what().


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