Use Try/Catch in ActionScript
2007-06-09 14:27
369 查看
当使用browse()方法浏览本地文件时,如果之前已经打开了一个文件浏览对话框,则会出错;同时如果用户的浏览器配置为拒绝浏览本地文件时,同样会出错,此时最好采用try/catch 来监视错误。用法如下:
try { fileReference.browse( ); } catch (illegalOperation:IllegalOperationError) { // code to handle error }
相关文章推荐
- Understanding Try/Catch in ActionScript
- Uncaught Error: Error calling method on NPObject 或者uncaught exception: Error in Actionscript. Use a
- VC编译错误:Cannot use __try in functions that require object unwinding
- [FLASH]Understanding ActionScript 3 debugging in Flash
- How to use my view helpers in my ActionMailer views?
- root, stage and timeline in ActionScript3.0
- use python in vim script of ~/.vimrc
- Javascript:基本语句(if-else/switch/for/while/for-in/try-catch)
- Design Patterns in ActionScript
- AS3 Strategy策略模式翻译(Design Patterns in ActionScript)
- format actionscript3 code in flex
- [Django] use django modules in standalone python script
- [文章摘要]The parallel coordinate plot in action: design and use for geographic visualization
- Detect Chinese character through out a string in Actionscript3.0
- How to use JSon data in mvc action and post form data use JQuery ajax
- Using ActionScript in Flex
- How to format date for display or to use in a shell script
- [转] Try to use one var statement per scope in JavaScript
- VC编译错误:Cannot use __try in functions that require object unwinding
- com.atomikos.icatch.SysException: Error in init(): Log already in use