Skip to content

Commit

Permalink
Rethrow exception if RadiantTest initialisation fails
Browse files Browse the repository at this point in the history
No point in continuing with a possibly null core module pointer, which will
just create segfaults later.
  • Loading branch information
Matthew Mott committed May 3, 2021
1 parent b7d3cd3 commit 10a853e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/RadiantTest.h
Expand Up @@ -63,7 +63,12 @@ class RadiantTest :
catch (module::CoreModule::FailureException & ex)
{
// Streams are not yet initialised, so log to std::err at this point
std::cerr << "RadiantTest initialisation failed:\n\t";
std::cerr << ex.what() << std::endl;

// Re-throw the exception and abort the test. There's no point in
// continuing if we couldn't construct the core module.
throw;
}
}

Expand Down

0 comments on commit 10a853e

Please sign in to comment.