CMS 3D CMS Logo

Throw.cc
Go to the documentation of this file.
3 #include <ostream>
4 #include <cstring>
5 
6 void
7 throwStorageError (const char* category,
8  const char *context,
9  const char *call, int error)
10 {
11  cms::Exception ex(category);
12  ex << call << " failed with system error '"
13  << strerror (error) << "' (error code " << error << ")";
14  ex.addContext(context);
15  throw ex;
16 }
17 
18 void
20  const char *context,
21  const char *call, int error)
22 {
23  edm::Exception ex(category);
24  ex << call << " failed with system error '"
25  << strerror (error) << "' (error code " << error << ")";
26  ex.addContext(context);
27  throw ex;
28 }
void throwStorageError(const char *category, const char *context, const char *call, int error)
Definition: Throw.cc:7
void addContext(std::string const &context)
Definition: Exception.cc:227