Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronicException Class Reference

#include <G4HadronicException.hh>

+ Inheritance diagram for G4HadronicException:

Public Member Functions

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

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
37 G4cout << whatString;
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

◆ ~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}

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