Geant4-11
Public Member Functions | Private Attributes
G4HadronicException Class Reference

#include <G4HadronicException.hh>

Inheritance diagram for G4HadronicException:

Public Member Functions

 G4HadronicException (G4String in, G4int at, G4String mess)
 
void Report (std::ostream &aS) const
 
const char * what () const noexcept override
 
virtual ~G4HadronicException () throw ()
 

Private Attributes

const G4int theLine
 
const G4String theMessage
 
const G4String theName
 
G4String whatString
 

Detailed Description

Definition at line 32 of file G4HadronicException.hh.

Constructor & Destructor Documentation

◆ G4HadronicException()

G4HadronicException::G4HadronicException ( G4String  in,
G4int  at,
G4String  mess 
)

Definition at line 30 of file G4HadronicException.cc.

31 : theMessage{mess}, theName{in}, theLine{at} {
32
33 std::ostringstream os;
34 Report(os);
35 whatString = os.str();
36
38
39 if (std::getenv("DumpCoreOnHadronicException")) {
40 G4Exception("G4HadronicException", "007", FatalException,
41 "Fatal problem in above location");
42 }
43}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
G4GLOB_DLL std::ostream G4cout
void Report(std::ostream &aS) const

References FatalException, G4cout, G4Exception(), Report(), and whatString.

◆ ~G4HadronicException()

G4HadronicException::~G4HadronicException ( )
throw (
)
virtual

Definition at line 45 of file G4HadronicException.cc.

46{}

Member Function Documentation

◆ Report()

void G4HadronicException::Report ( std::ostream &  aS) const

◆ what()

const char * G4HadronicException::what ( ) const
overridenoexcept

Definition at line 48 of file G4HadronicException.cc.

48 {
49 return whatString.c_str();
50}

References whatString.

Field Documentation

◆ theLine

const G4int G4HadronicException::theLine
private

Definition at line 45 of file G4HadronicException.hh.

Referenced by Report().

◆ theMessage

const G4String G4HadronicException::theMessage
private

Definition at line 43 of file G4HadronicException.hh.

Referenced by Report().

◆ theName

const G4String G4HadronicException::theName
private

Definition at line 44 of file G4HadronicException.hh.

Referenced by Report().

◆ whatString

G4String G4HadronicException::whatString
private

Definition at line 47 of file G4HadronicException.hh.

Referenced by G4HadronicException(), and what().


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