Commit 129d103f authored by Michael Arntzenius's avatar Michael Arntzenius

don't assert() if python errors inside of a CFGVisitor's RAII scope

parent 7e26d109
......@@ -74,8 +74,10 @@ public:
}
~CFGVisitor() {
assert(regions.size() == 0);
assert(exc_handlers.size() == 0);
// if we're being destroyed due to an exception, our internal invariants may be violated, but that's okay; the
// CFG isn't going to get used anyway. (Maybe we should check that it won't be used somehow?)
assert(regions.size() == 0 || std::uncaught_exception());
assert(exc_handlers.size() == 0 || std::uncaught_exception());
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment