as3.0 try catch 捕获是代码哪一行报错
答案:2 悬赏:50 手机版
解决时间 2021-04-07 20:14
- 提问者网友:记得曾经
- 2021-04-07 00:05
as3.0 try catch 捕获是代码哪一行报错
最佳答案
- 五星知识达人网友:痴妹与他
- 2021-04-07 00:52
使用目的:捕获在特定程序语句中发生的错误。
说明:在try语句中加入可能发生错误的代码,而catch语句则包含用来处理确实发生错误的代码。catch语句需要一个变量参数,它的初始值是发生的错误值。使用try-catch进行错误处理,则actionscript将不会把一般的错误信息显示给用户。
语法结构:try{可能发生的错误语句;}catch(变量参数){处理确实发生错误的语句;}
范例:try{chkPasWord();}catch(showError){alter("发生错误"+showError);}
--
芦笛
Kevin.Reed.Lu
电话:010-6556-0163
手机:156-5223-9440
传真:010-80115555-765910
飞信:2010-00-910
信箱:10010910@163.com
抄送:910@37163.cn
Gtalk:765910@gmail.com
MSN:Reed.lu@msn.com
QQ:114-9966-910 UC:800-56205
This message and any attachments may be privileged, confidential and intended for the addressee(s) or an authorized representative only. If you are not the intended recipient, please be notified that any dissemination, distribution, or copying of this e-mail, parts of it or contained information by any other person is strictly prohibited. If you have received this message in error, please delete it and notify Tevia.Aisa Limited. Our company accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Our company retains the copyright to all e-mail messages sent from its communications systems.
评论这张
说明:在try语句中加入可能发生错误的代码,而catch语句则包含用来处理确实发生错误的代码。catch语句需要一个变量参数,它的初始值是发生的错误值。使用try-catch进行错误处理,则actionscript将不会把一般的错误信息显示给用户。
语法结构:try{可能发生的错误语句;}catch(变量参数){处理确实发生错误的语句;}
范例:try{chkPasWord();}catch(showError){alter("发生错误"+showError);}
--
芦笛
Kevin.Reed.Lu
电话:010-6556-0163
手机:156-5223-9440
传真:010-80115555-765910
飞信:2010-00-910
信箱:10010910@163.com
抄送:910@37163.cn
Gtalk:765910@gmail.com
MSN:Reed.lu@msn.com
QQ:114-9966-910 UC:800-56205
This message and any attachments may be privileged, confidential and intended for the addressee(s) or an authorized representative only. If you are not the intended recipient, please be notified that any dissemination, distribution, or copying of this e-mail, parts of it or contained information by any other person is strictly prohibited. If you have received this message in error, please delete it and notify Tevia.Aisa Limited. Our company accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Our company retains the copyright to all e-mail messages sent from its communications systems.
评论这张
全部回答
- 1楼网友:一袍清酒付
- 2021-04-07 01:26
第一 function ioerrorhandler() 里面不要写参数么。。
第二 try catch 和 捕获 错误是两个东西。。
如果你选择了捕获 ioerror 则 不会 被 catch到
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯