Skip to content

Commit

Permalink
Make std::uncaught_exception warning less noisy
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 9, 2019
1 parent 926d3e5 commit 55bba8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/libutil/json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,9 @@ JSONObject JSONPlaceholder::object()
return JSONObject(state);
}

JSONPlaceholder::~JSONPlaceholder()
{
assert(!first || std::uncaught_exception());
}

}
5 changes: 1 addition & 4 deletions src/libutil/json.hh
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@ public:
{
}

~JSONPlaceholder()
{
assert(!first || std::uncaught_exception());
}
~JSONPlaceholder();

template<typename T>
void write(const T & v)
Expand Down

0 comments on commit 55bba8e

Please sign in to comment.