diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-06 17:58:39 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-06 17:58:39 +0100 |
commit | fecab9b936f5985da254ca42976eeaf8dbcbea1d (patch) | |
tree | a1d2bd5fc59c646f89af9ce9de624a3386afe71d /documentation/exceptions.html | |
parent | 2bd3471192b1ebd8f3841368db4b0eaa5643bf55 (diff) |
changes to documentation, removed empty exception.cpp implementation, fixed exception handling
Diffstat (limited to 'documentation/exceptions.html')
-rw-r--r-- | documentation/exceptions.html | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/documentation/exceptions.html b/documentation/exceptions.html index 1af4913..88af60f 100644 --- a/documentation/exceptions.html +++ b/documentation/exceptions.html @@ -126,15 +126,22 @@ extern "C" { <?php // call "callMe" for the first time, and supply a function that returns "first call" -echo(callMe(function() { - return "first call\n"; -})); +$output = callMe(function() { + return "First call"; +}); + +// show output (this will be "First call") +echo("$output\n"); // call "callMe" for the second time, but throw an exception this time -echo(callMe(function() { +$output = callMe(function() { throw new Exception("Sorry...\n"); - return "second call\n"; -})); + return "Second call\n"; +}); + +// show output (this will be "Exception caught") +echo("$output\n"); + ?> </code></pre> </p> |