Skip to content
Snippets Groups Projects
Commit 88a608a9 authored by Soeren Peters's avatar Soeren Peters
Browse files

As bad_alloc derives from exception, we need to catch it first.

parent a9b39601
No related branches found
No related tags found
1 merge request!27Remove GPU compiler warnings (Closes #4, #12)
......@@ -364,16 +364,14 @@ int main( int argc, char* argv[])
//////////////////////////////////////////////////////////////////////////
}
catch (const std::bad_alloc& e)
{
*logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n";
}
catch (const std::exception& e)
{
{
*logging::out << logging::Logger::LOGGER_ERROR << e.what() << "\n";
}
catch (const std::bad_alloc e)
{
*logging::out << logging::Logger::LOGGER_ERROR << "Bad Alloc:" << e.what() << "\n";
}
catch (...)
{
*logging::out << logging::Logger::LOGGER_ERROR << "Unknown exception!\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment