mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
gracefully deal with "eval" exceptions that occur during AST reduction
This commit is contained in:
parent
9a429808ab
commit
b7c9940221
2 changed files with 15 additions and 5 deletions
|
@ -14,6 +14,20 @@
|
|||
|
||||
namespace zeek::detail {
|
||||
|
||||
StmtPtr Reducer::Reduce(StmtPtr s)
|
||||
{
|
||||
reduction_root = std::move(s);
|
||||
|
||||
try
|
||||
{
|
||||
return reduction_root->Reduce(this);
|
||||
}
|
||||
catch ( InterpreterException& e )
|
||||
{
|
||||
/* Already reported. */
|
||||
return reduction_root;
|
||||
}
|
||||
}
|
||||
|
||||
ExprPtr Reducer::GenTemporaryExpr(const TypePtr& t, ExprPtr rhs)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue