YENGtry
From OpenSimulator
(Difference between revisions)
(Created page with "try, catch and finally allow to handle some exceptions without getting the script killed. * on the try block we place the code we want to run protected. * on the catch block ...") |
|||
Line 6: | Line 6: | ||
a try block must be follow by at least one catch or finally block | a try block must be follow by at least one catch or finally block | ||
− | there can be several catch blocks one per exception type, but only one finally | + | there can be several catch blocks one per exception type, but only one finally<br> |
+ | |||
+ | <div style="background-color:#FFA0A0; padding:10px; padding-bottom:5px; border: 1px #FF544F solid"> | ||
+ | '''There can not be any llResetScript or osResetAllScripts. script will compile but fail with a severe runtime error | ||
+ | </div><br> |
Revision as of 15:44, 19 September 2020
try, catch and finally allow to handle some exceptions without getting the script killed.
- on the try block we place the code we want to run protected.
- on the catch block or blocks we place code to handle the exceptions
- on the finally block we place code that should run always.
a try block must be follow by at least one catch or finally block
there can be several catch blocks one per exception type, but only one finally
There can not be any llResetScript or osResetAllScripts. script will compile but fail with a severe runtime error