Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cetlib
cetlib
sqlite
Exception.cc
Go to the documentation of this file.
1
#include "
cetlib/sqlite/Exception.h
"
2
3
using namespace
cet::sqlite
;
4
5
// Map an cet::sqlite::errors::ErrorCodes into the appropriate string.
6
std::string
7
ExceptionDetail::translate
(
errors::ErrorCodes
const
code
)
8
{
9
using namespace
errors;
10
11
switch
(code) {
12
case
LogicError
:
13
return
"LogicError"
;
14
case
SQLExecutionError
:
15
return
"SQLExecutionError"
;
16
case
OtherError
:
17
return
"OtherError"
;
18
case
Unknown
:
19
return
"Unknown"
;
20
}
21
throw
Exception
(
errors::LogicError
)
22
<<
"Internal error: missing string translation for error "
<< code
23
<<
" which was not caught at compile time!\n"
;
24
}
25
26
// ======================================================================
cet::sqlite::errors::SQLExecutionError
Definition:
Exception.h:18
cet::sqlite::errors::ErrorCodes
ErrorCodes
Definition:
Exception.h:18
string
std::string string
Definition:
nybbler.cc:12
cet::sqlite::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:27
cet::sqlite::errors::LogicError
Definition:
Exception.h:18
cet::sqlite::errors::Unknown
Definition:
Exception.h:18
code
CodeOutputInterface * code
Definition:
tclscanner.cpp:1114
cet::sqlite
Definition:
column.h:38
Exception.h
cet::sqlite::errors::OtherError
Definition:
Exception.h:18
cet::sqlite::ExceptionDetail::translate
std::string translate(errors::ErrorCodes)
Definition:
Exception.cc:7
Generated by
1.8.11