Document Exception Handling in Charm++
I've encountered a few things I couldn't find in the documentation with regards to error handling. In no particular order:
1) When is
std::terminate safe to call or should a
std::set_terminate be used to have
std::terminate call Charm++'s
abort function? If
std::set_terminate needs to be called, where should this be done (e.g. an initnode function?)?
2) Does Charm++ provide any exception handling or should all Charm++ methods really be marked
3) Can any Charm++ functions throw and if so how should we handle this?
4) What should happen if an exception is thrown inside a
pup function? I assume this is the
pup function's author's responsibility.
#1 Updated by Phil Miller 3 months ago
Thanks for bringing these questions.
std::terminate: We should probably modify the runtime system itself to make an appropriate call to
std::set_terminate. I'll look into that.
noexcept: Charm++ does no exception handling at all. We should probably mark the entire RTS
3. see 2
4. If there's code called within a
pup function that can throw an exception, it needs to be caught within the same function. If it propagates to the RTS, it will go unhandled, and the application will terminate.