LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::ExceptionDetail Namespace Reference

Functions

std::string translate (errors::ErrorCodes)
 

Function Documentation

std::string art::ExceptionDetail::translate ( errors::ErrorCodes  code)

Definition at line 18 of file Exception.cc.

References art::errors::BadAlloc, art::errors::BadExceptionType, art::errors::CatalogServiceError, art::errors::Configuration, art::errors::DataCorruption, art::errors::DictionaryNotFound, art::errors::EndJobFailure, art::errors::EventProcessorFailure, art::errors::EventRangeOverlap, art::errors::EventTimeout, art::errors::FatalRootError, art::errors::FileOpenError, art::errors::FileReadError, art::errors::InvalidNumber, art::errors::InvalidReference, art::errors::LogicError, art::errors::MismatchedInputFiles, art::errors::NotFound, art::errors::NullPointerError, art::errors::OtherArt, art::errors::ProductCannotBeAggregated, art::errors::ProductDoesNotSupportPtr, art::errors::ProductDoesNotSupportViews, art::errors::ProductNotFound, art::errors::ProductPutFailure, art::errors::ProductRegistrationFailure, art::errors::ScheduleExecutionFailure, art::errors::ServiceNotFound, art::errors::SQLExecutionError, art::errors::StdException, art::errors::TypeConversion, art::errors::UnimplementedFeature, and art::errors::Unknown.

Referenced by larg4::G4BadIdeaAction::SteppingAction().

19 {
20  using namespace errors;
21 
22  switch (code) {
23  case OtherArt:
24  return "OtherArt";
25  case StdException:
26  return "StdException";
27  case Unknown:
28  return "Unknown";
29  case BadAlloc:
30  return "BadAlloc";
31  case BadExceptionType:
32  return "BadExceptionType";
33  case ProductNotFound:
34  return "ProductNotFound";
35  case DictionaryNotFound:
36  return "DictionaryNotFound";
37  case ProductPutFailure:
38  return "ProductPutFailure";
39  case Configuration:
40  return "Configuration";
41  case LogicError:
42  return "LogicError";
44  return "UnimplementedFeature";
45  case InvalidReference:
46  return "InvalidReference";
47  case TypeConversion:
48  return "TypeConversion";
49  case NullPointerError:
50  return "NullPointerError";
51  case EventTimeout:
52  return "EventTimeout";
53  case DataCorruption:
54  return "DataCorruption";
56  return "ScheduleExecutionFailure";
58  return "EventProcessorFailure";
59  case EndJobFailure:
60  return "EndJobFailure";
61  case FileOpenError:
62  return "FileOpenError";
63  case FileReadError:
64  return "FileReadError";
65  case FatalRootError:
66  return "FatalRootError";
68  return "MismatchedInputFiles";
70  return "CatalogServiceError";
72  return "ProductDoesNotSupportViews";
74  return "ProductDoesNotSupportPtr";
75  case SQLExecutionError:
76  return "SQLExecutionError";
77  case InvalidNumber:
78  return "InvalidNumber";
79  case NotFound:
80  return "NotFound";
81  case ServiceNotFound:
82  return "ServiceNotFound";
84  return "ProductCannotBeAggregated";
86  return "ProductRegistrationFailure";
87  case EventRangeOverlap:
88  return "EventRangeOverlap";
89  }
91  << "Internal error: missing string translation for error " << code
92  << " which was not caught at compile time!\n";
93 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66