Skip to content

Commit

Permalink
error case
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan authored Dec 15, 2023
1 parent e0241af commit 93017dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/phare/phare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ std::unique_ptr<PHARE::initializer::DataProvider> fromCommandLine(int argc, char

int main(int argc, char** argv)
{
std::signal(SIGINT, signal_handler);
std::signal(SIGABRT, signal_handler);
if (std::signal(SIGINT, signal_handler) == SIG_ERR) {
throw std::runtime_error("PHARE Error: Failed to register SIGINT signal handler");
}
if (std::signal(SIGABRT, signal_handler) == SIG_ERR) {
throw std::runtime_error("PHARE Error: Failed to register SIGABRT signal handler");
}

std::string const welcome = R"~(
_____ _ _ _____ ______
Expand Down

0 comments on commit 93017dd

Please sign in to comment.