Skip to content

Commit 7255bf6

Browse files
committed
Treat "throw" like "raise" in analysis
1 parent cac93ce commit 7255bf6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

analysis/reanalyze/src/Exception.ml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,11 @@ let traverseAst () =
249249
case.c_guard |> iterExprOpt self;
250250
case.c_rhs |> iterExpr self)
251251
in
252-
let isRaise s = s = "Pervasives.raise" || s = "Pervasives.raise_notrace" in
252+
let isRaise s =
253+
s = "Pervasives.raise"
254+
|| s = "Pervasives.raise_notrace"
255+
|| s = "Pervasives.throw"
256+
in
253257
let raiseArgs args =
254258
match args with
255259
| [(_, Some {Typedtree.exp_desc = Texp_construct ({txt}, _, _)})] ->

0 commit comments

Comments
 (0)