Message: Do G4Exception severities trigger the actions they describe? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Do G4Exception severities trigger the actions they describe? 

Forum: Run Management
Date: 25 Jun, 2016
From: Michael H. Kelsey <Michael H. Kelsey>

I am writing some new physics process code. In some corner situations, I end up with a badly configured track (specifically, a null pointer to a lookup table) and the track or event should be aborted as a result.

I've written a proper G4Exception to that effect, using "EventMustBeAborted" as the severity code ("Error happens during tracking a particle. The event currently being processed should be aborted, run will not be aborted."), but nothing happens except that the exception message is printed out. The code proceeds through and I get the same segfault I was getting before adding the G4Exception.

The header file G4ExceptionSeverity.hh describes the five severity levels -- FatalException, FatalErrorInArgument, RunMustBeAborted, EventMustBeAborted, JustWarning -- and what should happen in the job as a result of each of them. However, it seems like only the two "Fatal" levels actually trigger a failure. The other three, instead of affecting the event loop, just print a message and proceed.

Is this the expected behaviour? I'm building against 10.2 patch-01.

  -- Mike Kelsey

 Add Message Add Message
to: "Do G4Exception severities trigger the actions they describe?"

 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 ]