Skip to content

Commit

Permalink
TODO try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpintarelli committed Oct 16, 2024
1 parent 5d40b73 commit cb4f772
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/testing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ call_test(std::string label__, F&& f__, Args&&... args__)
{
int err{0};
std::string msg;
try {
// try {
err = f__(std::forward<Args>(args__)...);
} catch (std::exception const& e) {
err = 1;
msg = e.what();
} catch (...) {
err = 2;
msg = "unknown exception";
}
// } catch (std::exception const& e) {
// err = 1;
// msg = e.what();
// } catch (...) {
// err = 2;
// msg = "unknown exception";
// }
if (err) {
std::cout << label__ << " : Failed" << std::endl;
if (msg.size()) {
Expand Down

0 comments on commit cb4f772

Please sign in to comment.