Skip to content

Commit e66fb38

Browse files
committed
* catch an exception by references, otherwise g++ issues warning
in version 9 [rtj]
1 parent da0f2e2 commit e66fb38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/AdaptiveSampler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ int AdaptiveSampler::mergeState(const std::string filename)
748748
fMaximum_cells = keyval.at("fMaximum_cells");
749749
fEfficiency_target = keyval.at("fEfficiency_target");
750750
}
751-
catch (std::exception e) {
751+
catch (std::exception &e) {
752752
std::cerr << "AdaptiveSampler::mergeState warning - "
753753
<< "required keyword missing in " << filename
754754
<< std::endl;

src/GlueXSteppingAction.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void GlueXSteppingAction::UserSteppingAction(const G4Step* step)
219219
try {
220220
proftree = bgprofiles.at(det);
221221
}
222-
catch(std::out_of_range err) {
222+
catch(std::out_of_range &err) {
223223
std::stringstream names;
224224
names << "det" << det;
225225
std::stringstream titles;

0 commit comments

Comments
 (0)