Skip to content
Snippets Groups Projects
Commit f1c1c406 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Capture polymorphic exceptions by reference

parent e25eed41
No related branches found
No related tags found
No related merge requests found
......@@ -242,8 +242,7 @@ int main (int argc, char *argv[]) try
}
} catch (Exception e) {
std::cout << e << std::endl;
}
} catch (Exception& e)
{
std::cout << e.what() << std::endl;
}
......@@ -241,10 +241,7 @@ int main (int argc, char *argv[]) try
}
// //////////////////////////////
} catch (Exception e) {
std::cout << e << std::endl;
}
} catch (Exception& e)
{
std::cout << e.what() << std::endl;
}
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