main: catch all exceptions, close ncurses and rethrow

This commit is contained in:
Maxime Coste 2011-09-02 17:05:44 +00:00
parent f1631de4e0
commit 053b2e233e

View File

@ -312,12 +312,10 @@ int main()
}
deinit_ncurses();
}
catch (std::runtime_error& error)
catch (...)
{
deinit_ncurses();
puts("unhandled exception : ");
puts(error.what());
return -1;
throw;
}
return 0;
}