File indexing completed on 2023-03-17 11:26:55
0001 #include "Utilities/StorageFactory/src/Throw.h"
0002 #include "FWCore/Utilities/interface/Exception.h"
0003 #include <ostream>
0004 #include <cstring>
0005
0006 void throwStorageError(const char *category, const char *context, const char *call, int error) {
0007 cms::Exception ex(category);
0008 ex << call << " failed with system error '" << strerror(error) << "' (error code " << error << ")";
0009 ex.addContext(context);
0010 throw ex;
0011 }
0012
0013 void throwStorageError(edm::errors::ErrorCodes category, const char *context, const char *call, int error) {
0014 edm::Exception ex(category);
0015 ex << call << " failed with system error '" << strerror(error) << "' (error code " << error << ")";
0016 ex.addContext(context);
0017 throw ex;
0018 }