LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Exception.cc
Go to the documentation of this file.
1
// ======================================================================
2
//
3
// Exception: art-specific customizations for cetlib/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
12
#include "
canvas/Utilities/Exception.h
"
13
14
using namespace
art
;
15
16
// Map an art::errors::ErrorCodes into the appropriate string.
17
std::string
18
ExceptionDetail::translate
(
errors::ErrorCodes
code)
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"
;
46
case
UnimplementedFeature
:
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"
;
58
case
ScheduleExecutionFailure
:
59
return
"ScheduleExecutionFailure"
;
60
case
EventProcessorFailure
:
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"
;
70
case
MismatchedInputFiles
:
71
return
"MismatchedInputFiles"
;
72
case
CatalogServiceError
:
73
return
"CatalogServiceError"
;
74
case
ProductDoesNotSupportViews
:
75
return
"ProductDoesNotSupportViews"
;
76
case
ProductDoesNotSupportPtr
:
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"
;
86
case
ProductCannotBeAggregated
:
87
return
"ProductCannotBeAggregated"
;
88
case
ProductRegistrationFailure
:
89
return
"ProductRegistrationFailure"
;
90
case
EventRangeOverlap
:
91
return
"EventRangeOverlap"
;
92
}
93
throw
Exception
{
errors::LogicError
}
94
<<
"Internal error: missing string translation for error "
<< code
95
<<
" which was not caught at compile time!\n"
;
96
}
97
98
// ======================================================================
art::errors::NotFound
Definition:
Exception.h:52
art::errors::StdException
Definition:
Exception.h:25
art::errors::EventTimeout
Definition:
Exception.h:38
art::errors::BadExceptionType
Definition:
Exception.h:28
art::errors::UnimplementedFeature
Definition:
Exception.h:34
art::errors::CatalogServiceError
Definition:
Exception.h:47
art::errors::LogicError
Definition:
Exception.h:33
art::errors::ProductDoesNotSupportPtr
Definition:
Exception.h:49
art::errors::TypeConversion
Definition:
Exception.h:36
art::errors::EndJobFailure
Definition:
Exception.h:42
art::errors::InvalidReference
Definition:
Exception.h:35
art::errors::Configuration
Definition:
Exception.h:32
art::errors::EventRangeOverlap
Definition:
Exception.h:56
art::errors::InvalidNumber
Definition:
Exception.h:51
art::errors::ServiceNotFound
Definition:
Exception.h:53
art::errors::ProductRegistrationFailure
Definition:
Exception.h:55
art::errors::ProductCannotBeAggregated
Definition:
Exception.h:54
art::ExceptionDetail::translate
std::string translate(errors::ErrorCodes)
Definition:
Exception.cc:18
art::errors::ErrorCodes
ErrorCodes
Definition:
Exception.h:23
art::errors::ScheduleExecutionFailure
Definition:
Exception.h:40
art::errors::FatalRootError
Definition:
Exception.h:45
art::errors::ProductNotFound
Definition:
Exception.h:29
art::errors::ProductPutFailure
Definition:
Exception.h:31
art::errors::OtherArt
Definition:
Exception.h:24
art::errors::Unknown
Definition:
Exception.h:26
art::errors::DataCorruption
Definition:
Exception.h:39
art::errors::BadAlloc
Definition:
Exception.h:27
art::errors::DictionaryNotFound
Definition:
Exception.h:30
art::errors::NullPointerError
Definition:
Exception.h:37
art::errors::ProductDoesNotSupportViews
Definition:
Exception.h:48
art::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:66
art::errors::SQLExecutionError
Definition:
Exception.h:50
art::errors::MismatchedInputFiles
Definition:
Exception.h:46
art
HLT enums.
Definition:
ServiceProviderWrappers.h:36
art::errors::FileReadError
Definition:
Exception.h:44
Exception.h
art::errors::FileOpenError
Definition:
Exception.h:43
art::errors::EventProcessorFailure
Definition:
Exception.h:41
canvas
Utilities
Exception.cc
Generated on Thu Jul 26 2018 13:09:44 for LArSoft by
1.8.11