summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/validator.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/validator.cc b/src/validator.cc
index d413838a..750cd5b7 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -597,8 +597,9 @@ void Validator::CheckExpr(const Expr* expr) {
if (found_catch_all)
PrintError(&catch_->loc, "Appears after catch all block");
const Exception* except = nullptr;
- CheckExceptVar(&catch_->var, &except);
- typechecker_.OnCatch(&except->sig);
+ if (WABT_SUCCEEDED(CheckExceptVar(&catch_->var, &except))) {
+ typechecker_.OnCatch(&except->sig);
+ }
}
CheckExprList(&catch_->loc, catch_->first);
}