Skip to content

Commit

Permalink
Merge pull request #88 from jasalt/master
Browse files Browse the repository at this point in the history
Fix example code on exceptions
  • Loading branch information
Chemaclass authored Nov 1, 2024
2 parents 0df0af3 + bb69d5d commit 1ce106f
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 1ce106f

Please sign in to comment.