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
Branches
No related tags found
No related merge requests found
...@@ -242,8 +242,7 @@ int main (int argc, char *argv[]) try ...@@ -242,8 +242,7 @@ int main (int argc, char *argv[]) try
} }
} catch (Exception e) { } catch (Exception& e)
{
std::cout << e << std::endl; std::cout << e.what() << std::endl;
}
}
...@@ -241,10 +241,7 @@ int main (int argc, char *argv[]) try ...@@ -241,10 +241,7 @@ int main (int argc, char *argv[]) try
} }
} catch (Exception& e)
// ////////////////////////////// {
} catch (Exception e) { std::cout << e.what() << std::endl;
}
std::cout << e << std::endl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment