LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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  // Let the compiler tell us we missed one.
24  // default : return "Unknown code";
25 
26  case OtherArt:
27  return "OtherArt";
28  case StdException:
29  return "StdException";
30  case Unknown:
31  return "Unknown";
32  case BadAlloc:
33  return "BadAlloc";
34  case BadExceptionType:
35  return "BadExceptionType";
36  case ProductNotFound:
37  return "ProductNotFound";
38  case DictionaryNotFound:
39  return "DictionaryNotFound";
40  case ProductPutFailure:
41  return "ProductPutFailure";
42  case Configuration:
43  return "Configuration";
44  case LogicError:
45  return "LogicError";
47  return "UnimplementedFeature";
48  case InvalidReference:
49  return "InvalidReference";
50  case TypeConversion:
51  return "TypeConversion";
52  case NullPointerError:
53  return "NullPointerError";
54  case EventTimeout:
55  return "EventTimeout";
56  case DataCorruption:
57  return "DataCorruption";
59  return "ScheduleExecutionFailure";
61  return "EventProcessorFailure";
62  case EndJobFailure:
63  return "EndJobFailure";
64  case FileOpenError:
65  return "FileOpenError";
66  case FileReadError:
67  return "FileReadError";
68  case FatalRootError:
69  return "FatalRootError";
71  return "MismatchedInputFiles";
73  return "CatalogServiceError";
75  return "ProductDoesNotSupportViews";
77  return "ProductDoesNotSupportPtr";
78  case SQLExecutionError:
79  return "SQLExecutionError";
80  case InvalidNumber:
81  return "InvalidNumber";
82  case NotFound:
83  return "NotFound";
84  case ServiceNotFound:
85  return "ServiceNotFound";
87  return "ProductCannotBeAggregated";
89  return "ProductRegistrationFailure";
90  case EventRangeOverlap:
91  return "EventRangeOverlap";
92  }
94  << "Internal error: missing string translation for error " << code
95  << " which was not caught at compile time!\n";
96 }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66