habitat-sim icon indicating copy to clipboard operation
habitat-sim copied to clipboard

--[BE Week]Modify ESP_CHECK to exit not abort.

Open jturner65 opened this issue 1 year ago • 0 comments

Motivation and Context

Currently our ESP_CHECK macro was exiting the program via std::abort(), providing a core dump. However, it is most often used to verify data or check the results of file IO, for which a core dump is undesirable. This PR changes ESP_CHECK to std::exit(1) instead, avoiding the core dump.

An alternative mechanism that provides the assertion-like behavior with the std::abort/core dump functionality while also communicating with python properly is being investigated for a future PR.

How Has This Been Tested

All current c++ and python tests pass.

Types of changes

  • [x] Docs change / refactoring / dependency upgrade
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] My code follows the code style of this project.
  • [x] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have completed my CLA (see CONTRIBUTING)
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

jturner65 avatar Jun 30 '23 14:06 jturner65