Exceptions: Difference between revisions

Added AppleScript version
No edit summary
(Added AppleScript version)
Line 1:
{{task}}
 
This task is to give an example of an exception handling routine.
 
==[[AppleScript]]==
[[Category:AppleScript]]
try
set num to 1 / 0
--do something that might throw an error
on error errMess number errNum
--errMess and number errNum are optional
display alert "Error # " & errNum & return & errMess
end try
 
==[[C plus plus|C++]]==
Anonymous user