Skip to content

Commit

Permalink
Fix example code on exceptions
Browse files Browse the repository at this point in the history
`Can not resolve type Exception` was given, related issue #87.
  • Loading branch information
jasalt authored Nov 1, 2024
1 parent 0df0af3 commit bb69d5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/documentation/control-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ All expressions are evaluated and if no exception is thrown the value of the las
(try) # evaluates to nil
(try
(throw (php/new Exception))
(catch Exception e "error")) # evaluates to "error"
(throw (php/new \Exception))
(catch \Exception e "error")) # evaluates to "error"
(try
(+ 1 1)
(finally (print "test"))) # Evaluates to 2 and prints "test"
(try
(throw (php/new Exception))
(catch Exception e "error")
(throw (php/new \Exception))
(catch \Exception e "error")
(finally (print "test"))) # evaluates to "error" and prints "test"
```

Expand Down

0 comments on commit bb69d5d

Please sign in to comment.