Project

General

Profile

Bug #3134

Non-informative exception thrown if FHICL parameter isn't found in a Service constructor

Added by Adam Lyon almost 7 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Infrastructure
Target version:
-
Start date:
11/20/2012
Due date:
% Done:

0%

Estimated time:
Occurs In:
Scope:
Experiment:
SSI Package:
Duration:

Description

I have a service that gets some parameters from a FHICL file. I do not supply a default to the pSet.get<> call. If the parameter is missing from the fcl, I do get an exception as expected, but the message contains no useful information telling my why an exception was thrown. For example,

    ---- Can't find key BEGIN
      world cet::exception going through module artg4Main/artg4Main run: 1
    ---- Can't find key END

World is the name of my service. That message makes it extremely difficult to figure out what parameter is not in my fcl file. Can this be fixed to print an informative message?


Related issues

Is duplicate of art - Feature #2445: Request improved error messageClosed02/02/201208/01/2015

History

#1 Updated by Christopher Green almost 7 years ago

The key in question here is, "world."

There are a few things we could do here to improve this exception. First, we can correct the formatting of this particular exception to have a newline after the key name, and perhaps introduce the key name with words instead of leaving it unadorned. We can also change "Can't Find Key" to 'KeyNotFound' to make it obvious that we're not saying, "Can't find key BEGIN."

More generally, we could put the BEGIN and END keywords at the front of the delimiter lines rather than the end. This may disrupt log file parsing, however.

#2 Updated by Christopher Green almost 7 years ago

  • Category set to Infrastructure
  • Status changed from New to Feedback
  • Assignee set to Christopher Green

#3 Updated by Christopher Green about 6 years ago

  • Status changed from Feedback to Rejected
  • Assignee deleted (Christopher Green)

Rejected as a duplicate.



Also available in: Atom PDF