Skip to content

Commit

Permalink
Merge pull request #41087 from Dr15Jones/externalFailureException_13_0
Browse files Browse the repository at this point in the history
Added new cms::errors::ExternalFailure exception [13_0]
  • Loading branch information
cmsbuild authored Mar 20, 2023
2 parents cb88613 + e1cf1bf commit f4fd9f8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FWCore/Integration/plugins/TestInterProcessProd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace testinter {
iTransitionID)) {
std::cout << id_ << " FAILED waiting for external process" << std::endl;
externalFailed_ = true;
throw cms::Exception("ExternalFailed");
throw edm::Exception(edm::errors::ExternalFailure);
}
return value;
}
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Integration/plugins/TestInterProcessRandomProd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace testinter {
iTransitionID)) {
std::cout << id_ << " FAILED waiting for external process" << std::endl;
externalFailed_ = true;
throw cms::Exception("ExternalFailed");
throw edm::Exception(edm::errors::ExternalFailure);
}
return value;
}
Expand Down
6 changes: 3 additions & 3 deletions FWCore/SharedMemory/interface/ControllerChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

// user include files
#include "FWCore/Utilities/interface/Transition.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/Utilities/interface/EDMException.h"
#include "FWCore/SharedMemory/interface/BufferInfo.h"

// forward declarations
Expand Down Expand Up @@ -63,7 +63,7 @@ namespace edm::shared_memory {
if (not wait(lock)) {
//std::cout << id_ << " FAILED waiting for external process" << std::endl;
*stop_ = true;
throw cms::Exception("ExternalFailed")
throw edm::Exception(edm::errors::ExternalFailure)
<< "Failed waiting for external process while setting up the process. Timed out after " << maxWaitInSeconds_
<< " seconds.";
} else {
Expand All @@ -87,7 +87,7 @@ namespace edm::shared_memory {
if (not wait(lock)) {
if (not iRetry()) {
*stop_ = true;
throw cms::Exception("ExternalFailed")
throw edm::Exception(edm::errors::ExternalFailure)
<< "Failed waiting for external process while setting up the process. Timed out after "
<< maxWaitInSeconds_ << " seconds with " << retryCount << " retries.";
}
Expand Down
2 changes: 1 addition & 1 deletion FWCore/SharedMemory/test/test_channels_startupTimeout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char** argv) {
retValue = controller(argc, argv, 5);
}
} catch (cms::Exception const& iException) {
if (iException.category() != "ExternalFailed") {
if (iException.category() != "ExternalFailure") {
throw;
} else {
std::cout << "expected failure occurred\n";
Expand Down
1 change: 1 addition & 0 deletions FWCore/Utilities/interface/EDMException.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ namespace edm {
FileNameInconsistentWithGUID = 8034,

UnavailableAccelerator = 8035,
ExternalFailure = 8036,

EventGenerationFailure = 8501,

Expand Down
1 change: 1 addition & 0 deletions FWCore/Utilities/src/EDMException.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace edm {
FILLENTRY(FileWriteError),
FILLENTRY(FileNameInconsistentWithGUID),
FILLENTRY(UnavailableAccelerator),
FILLENTRY(ExternalFailure),
FILLENTRY(EventGenerationFailure),
FILLENTRY(CaughtSignal)};
static const std::string kUnknownCode("unknownCode");
Expand Down

0 comments on commit f4fd9f8

Please sign in to comment.