Project

General

Profile

Support #1681

Document Exception Handling in Charm++

Added by Nils Deppe 3 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Documentation
Target version:
-
Start date:
10/31/2017
Due date:
% Done:

0%


Description

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 noexcept?

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.

Thanks!


Subtasks

Feature #1729: Mark the entire RTS noexceptNewMatthias Diener

Feature #1730: The RTS should set std::terminateNewMatthias Diener

History

#1 Updated by Phil Miller 3 months ago

Thanks for bringing these questions.

1. std::terminate: We should probably modify the runtime system itself to make an appropriate call to std::set_terminate. I'll look into that.

2. noexcept: Charm++ does no exception handling at all. We should probably mark the entire RTS noexcept

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.

#2 Updated by Nils Deppe 3 months ago

Thanks for the thorough explanation! I look forward to the Charm++ changes resulting from 1) and 2). These might even be implementable for 6.9 so that 7.0 will be less work :)

Also available in: Atom PDF