Exception.cc
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // Exception: art-specific customizations for cetlib_except/coded_exception
4 //
5 // Note that errors::ErrorCodes is tightly coupled to detail::translate()
6 // such that any change to one will necessitate a corresponding change to
7 // the other. The actions table in Framework/Core/Actions may also need
8 // adjustment.
9 //
10 // ======================================================================
11 
13 
14 using namespace art;
15 
16 // Map an art::errors::ErrorCodes into the appropriate string.
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 }
std::string string
Definition: nybbler.cc:12
std::string translate(errors::ErrorCodes)
Definition: Exception.cc:18
CodeOutputInterface * code
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66