File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -1274,10 +1274,27 @@ void _sendReadonlies() {
12741274*/
12751275void _initCharm (int unused_argc , char * * argv )
12761276{
1277- int inCommThread = (CmiMyRank () == CmiMyNodeSize ());
1277+ int inCommThread = (CmiMyRank () == CmiMyNodeSize ());
12781278
1279- DEBUGF (("[%d,%.6lf ] _initCharm started\n" ,CmiMyPe (),CmiWallTimer ()));
1280- std ::set_terminate ( [](){ CkAbort ("Unhandled C++ exception in user code.\n" );});
1279+ DEBUGF (("[%d,%.6lf ] _initCharm started\n" ,CmiMyPe (),CmiWallTimer ()));
1280+ std ::set_terminate ( [](){
1281+ std ::exception_ptr exptr = std ::current_exception ();
1282+ if (exptr )
1283+ {
1284+ try
1285+ {
1286+ std ::rethrow_exception (exptr );
1287+ }
1288+ catch (std ::exception & ex )
1289+ {
1290+ CkAbort ("Unhandled C++ exception in user code: %s.\n" , ex .what ());
1291+ }
1292+ }
1293+ else
1294+ {
1295+ CkAbort ("Unhandled C++ exception in user code.\n" );
1296+ }
1297+ });
12811298
12821299 CkpvInitialize (size_t * , _offsets );
12831300 CkpvAccess (_offsets ) = new size_t [32 ];
You can’t perform that action at this time.
0 commit comments