Message: Re: How to catch G4Exceptions ? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: How to catch G4Exceptions ? 

Forum: Run Management
Re: Question How to catch G4Exceptions ? (Julien Bolmont)
Re: Feedback Re: How to catch G4Exceptions ? (Jonathan Madsen)
Date: Feb 04, 20:31
From: Tom Roberts <Tom Roberts>

Geant4 generates "exceptions" by calling G4Exception(). You can "catch" 
them by implementing a class that inherits G4VExceptionHandler; 
configure it via G4StateManager. This is really an error- and 
warning-message routine, not C++ exceptions (which cannot be resumed).

Your class's Notify() function is called by G4Exception(). It is called 
for all types of exceptions and can do whatever you need to do, 
including returning to continue the program (except FatalException).

Tom Roberts

 Add Message Add Message
to: "Re: How to catch G4Exceptions ?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]