Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:32:08

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 }