Go to the documentation of this file.00001 #include "Utilities/StorageFactory/src/Throw.h"
00002 #include "FWCore/Utilities/interface/Exception.h"
00003 #include <ostream>
00004 #include <cstring>
00005
00006 void
00007 throwStorageError (const char* category,
00008 const char *context,
00009 const char *call, int error)
00010 {
00011 cms::Exception ex(category);
00012 ex << call << " failed with system error '"
00013 << strerror (error) << "' (error code " << error << ")";
00014 ex.addContext(context);
00015 throw ex;
00016 }
00017
00018 void
00019 throwStorageError (edm::errors::ErrorCodes category,
00020 const char *context,
00021 const char *call, int error)
00022 {
00023 edm::Exception ex(category);
00024 ex << call << " failed with system error '"
00025 << strerror (error) << "' (error code " << error << ")";
00026 ex.addContext(context);
00027 throw ex;
00028 }