Exception.cc
Go to the documentation of this file.
2 
3 using namespace cet::sqlite;
4 
5 // Map an cet::sqlite::errors::ErrorCodes into the appropriate string.
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  }
22  << "Internal error: missing string translation for error " << code
23  << " which was not caught at compile time!\n";
24 }
25 
26 // ======================================================================
std::string string
Definition: nybbler.cc:12
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:27
CodeOutputInterface * code
std::string translate(errors::ErrorCodes)
Definition: Exception.cc:7