Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
takikawa committed Jun 29, 2021
1 parent 177447c commit ff28aab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/wast-parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2794,6 +2794,7 @@ Result WastParser::ParseExpr(ExprList* exprs) {
break;
}
default:
ErrorExpected({"catch", "catch_all", "unwind", "delegate"});
break;
}
}
Expand Down
10 changes: 10 additions & 0 deletions test/parse/expr/bad-try-clause.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
;;; ERROR: 1
(module
(func (try (do) (foo)))
(;; STDERR ;;;
out/test/parse/expr/bad-try-clause.txt:5:20: error: unexpected token "foo", expected catch, catch_all, unwind or delegate.
(func (try (do) (foo)))
^^^
;;; STDERR ;;)

0 comments on commit ff28aab

Please sign in to comment.