Skip to content

Commit

Permalink
fix commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jriegel committed Feb 20, 2014
1 parent 56d5e19 commit 204bff8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/App/Application.cpp
Expand Up @@ -934,17 +934,17 @@ void segmentation_fault_handler(int sig)

}

void unhandled_exception_handler()
void terminate_handler()
{
std::cerr << "Unhandled exception..." << std::endl;
throw Base::Exception("Unhandled exception");
std::cerr << "Terminating..." << std::endl;

}

void unexpection_error_handler()
{
std::cerr << "Unexpected error occurred..." << std::endl;
throw Base::Exception("Unexpected error occurred");
// try to throw to give the user evantually a change to save
throw Base::Exception("Unexpected error occurred! Please save you work under a new file name and restart the application!");

terminate();
}
Expand All @@ -965,7 +965,7 @@ void Application::init(int argc, char ** argv)
#ifdef _MSC_VER // Microsoft compiler
std::signal(SIGSEGV,segmentation_fault_handler);
std::signal(SIGABRT,segmentation_fault_handler);
std::set_terminate(unhandled_exception_handler);
std::set_terminate(terminate_handler);
std::set_unexpected(unexpection_error_handler);
#endif

Expand Down

0 comments on commit 204bff8

Please sign in to comment.