Skip to content

Commit

Permalink
Merge pull request #10678 from NREL/debug_array
Browse files Browse the repository at this point in the history
Don't catch std::exception in Debug mode so we can catch array bound errors in debugger
  • Loading branch information
Myoldmopar authored Aug 22, 2024
2 parents 07dbb5b + ce1bde5 commit dd562e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/EnergyPlus/api/EnergyPlusPgm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,13 @@ int RunEnergyPlus(EnergyPlus::EnergyPlusData &state, std::string const &filepath
EnergyPlus::SimulationManager::ManageSimulation(state);
} catch (const EnergyPlus::FatalError &e) {
return EnergyPlus::AbortEnergyPlus(state);
#ifdef NDEBUG
} catch (const std::exception &e) {
ShowSevereError(state, e.what());
return EnergyPlus::AbortEnergyPlus(state);
#endif
}

return wrapUpEnergyPlus(state);
}

Expand Down

4 comments on commit dd562e2

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2893 of 2893 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2871 of 2871 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2077 of 2077 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (797 of 797 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.