Language Guide

CHAPTER 7
Control Statements
212 Try Statements
You can use the Error command to resignal an error. For example, in the
following Try statement, the Error command in the error handler resignals
the error exactly as it was received.
try
word 5 of "one two three"
on error number errNum from badObj
--statements that handle the error
error number errNum from badObj
end try
In the following Try statement, the Error command in the error handler
resignals the error, but changes the error message and error number. The
new error number is 600.
try
word 5 of "one two three"
on error
--statements that determine the cause of the error
error "There are not enough words." number 600
end try