From 204bff802f00d5cfa1ca72d07773045a91a13b57 Mon Sep 17 00:00:00 2001 From: jriegel Date: Thu, 20 Feb 2014 20:08:47 +0100 Subject: [PATCH] fix commit --- src/App/Application.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App/Application.cpp b/src/App/Application.cpp index bf023a4c8..18555d308 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -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(); } @@ -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