Exceptions: Difference between revisions

Content added Content deleted
No edit summary
(Added AppleScript version)
Line 1: Line 1:
{{task}}
{{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++]]==
==[[C plus plus|C++]]==