Project

General

Profile

Bug #7902

Error message on event number out of range seems misleading

Added by Thomas Junk over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Category:
Event Loop
Target version:
Start date:
02/18/2015
Due date:
% Done:

100%

Estimated time:
Spent time:
Occurs In:
Scope:
Internal
Experiment:
-
SSI Package:
art
Duration:

Description

In art/Persistency/Provenance/EventID.h,
the following range checker is in there:

inline
art::EventNumber_t
art::EventID::
inRangeOrInvalid(EventNumber_t e) {
if (e == INVALID_EVENT_NUMBER() ||
(e >= FIRST_EVENT_NUMBER() &&
e <= MAX_NATURAL_EVENT_NUMBER())) {
return e;
}
else {
throw Exception(errors::InvalidNumber)
<< "Attempt to construct SubRunID with an invalid number.\n"
<< "Maybe you want EventID::flushSubRun()?\n";
}
}

The problem is that the exception message complains about the SubRunID
and not the EventID. Also there's a SubRunID::flushSubRun -- is there
such a thing as EventID::flushSubRun?

Associated revisions

History

#1 Updated by Christopher Green over 4 years ago

  • Category set to Event Loop
  • Status changed from New to Resolved
  • Assignee set to Christopher Green
  • Target version set to 1.14.00
  • % Done changed from 0 to 100
  • SSI Package art added
  • SSI Package deleted ()

This is simply a matter of cut and paste from the analogous check in art::SubRunID. The correct message should read:

    throw Exception(errors::InvalidNumber)
      << "Attempt to construct an EventID with an invalid number.\n" 
      << "Maybe you want EventID::flushEvent()?\n";

This fix will be committed shortly to both the develop and v1_13-branch branches.

#2 Updated by Christopher Green over 4 years ago

Fixed with commits c5ec98c (develop) and fec1f16 (v1_13-branch).

#3 Updated by Christopher Green over 4 years ago

  • Target version changed from 1.14.00 to 1.13.02

#4 Updated by Christopher Green over 4 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF