Flash CS3 Documentation |
|||
| Programming ActionScript 3.0 > Handling errors > Error handling in ActionScript 3.0 > ActionScript 3.0 error-handling elements | |||
ActionScript 3.0 includes many tools for error handling, including:
throw statement. For Flash Player 9, native ActionScript methods and properties throw run-time errors that allow you to handle these exceptions more effectively when they occur, and then individually react to each exception. FileReference.upload() method returned a Boolean value of false if the upload() call was unsuccessful, indicating one of five possible errors. If an error occurs when you call the upload() method in ActionScript 3.0, you can throw one of four specific errors, which helps you display more accurate error messages to end users.name property has the value null (so, before you can use or display the name property, you need to ensure that the value is set and not null). In ActionScript 3.0, if you attempt to access the name property before it has been populated, Flash Player throws an IllegalOperationError, which informs you that the value has not been set, and you can use try..catch..finally blocks to handle the error. For more information see Using try..catch..finally statements.try..catch..finally blocks to handle errors takes little or no additional resources compared to previous versions of ActionScript.Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00000099.html