LArSoft
v09_90_00
Liquid Argon Software toolkit - https://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_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
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
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"
;
43
case
UnimplementedFeature
:
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"
;
55
case
ScheduleExecutionFailure
:
56
return
"ScheduleExecutionFailure"
;
57
case
EventProcessorFailure
:
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"
;
67
case
MismatchedInputFiles
:
68
return
"MismatchedInputFiles"
;
69
case
CatalogServiceError
:
70
return
"CatalogServiceError"
;
71
case
ProductDoesNotSupportViews
:
72
return
"ProductDoesNotSupportViews"
;
73
case
ProductDoesNotSupportPtr
:
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"
;
83
case
ProductCannotBeAggregated
:
84
return
"ProductCannotBeAggregated"
;
85
case
ProductRegistrationFailure
:
86
return
"ProductRegistrationFailure"
;
87
case
EventRangeOverlap
:
88
return
"EventRangeOverlap"
;
89
}
90
throw
Exception
{
errors::LogicError
}
91
<<
"Internal error: missing string translation for error "
<< code
92
<<
" which was not caught at compile time!\n"
;
93
}
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
Definition:
MVAAlg.h:12
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 May 2 2024 20:59:31 for LArSoft by
1.8.11