Project

General

Profile

Feature #9348

service missing exception NotFound does action SkipEvent instead of stopping program

Added by Jim Kowalkowski about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Infrastructure
Target version:
Start date:
07/09/2015
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:
Scope:
Internal
Experiment:
MicroBooNE
SSI Package:
art
Duration:

Description

Hi Everyone,

Herb asked me about services and NotFound exception handling. He mentioned that it looks like the behavior is to “skip event” when a service cannot be found.
I checked the exception configuration and the default is to “skip event” when a “NotFound” exception is caught. It looks like the service manager (through the ServiceHandle) does throw this exception when it cannot find a pointer to the service it is looking for.
I’m guessing that we want the default behavior for a missing service to be to stop the program because it will happen on every event. This means either change the default behavior of “NotFound”, or add a different exception that the service manager can through when a service pointer is not found which ends the program. Someone will need to look at the impact of either of these changes.

Right now Herb can affect the program behavior by using the scheduler options. The description is here:
https://cdcvs.fnal.gov/redmine/projects/art/wiki/ART_available_services
The defaults are here:
https://cdcvs.fnal.gov/redmine/projects/art/wiki/ExceptionInformation

I’ve confirmed that the default is to “SkipEvent”

void ActionTable::addDefaults_() {
// populate defaults that are not 'Rethrow'
// 'Rethrow' is the default default.
map_[art::Exception::codeToString(errors::ProductNotFound)] =
actions::SkipEvent;
map_[art::Exception::codeToString(errors::InvalidReference)] =
actions::SkipEvent;
map_[art::Exception::codeToString(errors::NullPointerError)] =
actions::SkipEvent;
map_[art::Exception::codeToString(errors::EventTimeout)] =
actions::SkipEvent;
map_[art::Exception::codeToString(errors::DataCorruption)] =
actions::SkipEvent;
map_[art::Exception::codeToString(errors::NotFound)] =
actions::SkipEvent;

Jim


Related issues

Related to art - Feature #9378: Change default exception handlingClosed2015-07-07

Associated revisions

Revision 07f0bc87 (diff)
Added by Christopher Green about 4 years ago

Fix for issue #9348.

Separate ServiceNotFound from other types of NotFound.

History

#1 Updated by Christopher Green about 4 years ago

  • Tracker changed from Support to Feature
  • Status changed from New to Accepted
  • Estimated time set to 0.50 h
  • SSI Package art added
  • SSI Package deleted ()

We will introduce a new exception, ServiceNotFound, which will be used in these circumstances and have the desired default behavior.

#2 Updated by Kyle Knoepfel about 4 years ago

  • Related to Feature #9378: Change default exception handling added

#3 Updated by Christopher Green about 4 years ago

  • Target version set to 1.15.01

#4 Updated by Christopher Green about 4 years ago

  • Status changed from Accepted to Resolved
  • Assignee set to Christopher Green
  • Start date changed from 07/01/2015 to 07/09/2015

The exception category thrown when a service cannot be found has been changed to ServiceNotFound, whose default behavior is to rethrow.

This change was implemented with 07f0bc8.

#5 Updated by Kyle Knoepfel almost 4 years ago

  • % Done changed from 0 to 100

#6 Updated by Kyle Knoepfel almost 4 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF