Project

General

Profile

NOVA exceptions

Currently there are at least 87 instances of NOvA code throwing a cet::exception

Current usage:

Code that contains the lines:

    throw cet::exception("BogusExceptionType")
      << "here is the user string";

yields output like:

%MSG-s ArtException:  PostCloseFile 05-Oct-2012 17:01:56 CDT PostEndRun
cet::exception caught in art
---- EventProcessorFailure BEGIN
  An exception occurred during current event processing
  ---- ScheduleExecutionFailure BEGIN
    ProcessingStopped.

    ---- BogusExceptionType BEGIN
      here is the user stringcet::exception going through module GENIEGen/generator run: 1 subRun: 1 event: 1
    ---- BogusExceptionType END
    Exception going through path simulate
  ---- ScheduleExecutionFailure END
  cet::exception caught in EventProcessor and rethrown
---- EventProcessorFailure END

The part that is specific to this particular throw is the portion:

    ---- BogusExceptionType BEGIN
      here is the user stringcet::exception going through module GENIEGen/generator run: 1 subRun: 1 event: 1
    ---- BogusExceptionType END

Proposed change to usage:

If the code is modified to include a few bits of extra info and some formatting:

    throw cet::exception("BogusExceptionType")
      << "here is the user string\n" 
      << __FILE__ << ":" << __LINE__ << "\n";

then the part specific to BogusExceptionType looks like:

    ---- BogusExceptionType BEGIN
      here is the user string
      /nova/app/users/rhatcher/art/devel_genie/EventGenerator/GENIE/GENIEGen.cxx:178
      cet::exception going through module GENIEGen/generator run: 1 subRun: 1 event: 1
    ---- BogusExceptionType END