首页 > 学院 > 开发设计 > 正文

全局异常处理 global exception

2019-11-06 08:21:17
字体:
来源:转载
供稿:网友

To catch an exception on global application level. Thismeans catching an exception not in a function but globally catching allexceptions in the application.

1. 在PRogram 中写入

2. 在将处理异常的方法加入到Application.ThreadException中

3. 写好异常处理方法

 

在程序的其他地方抛出异常时,程序就会调用处理异常的方法, 根据不同的异常给出不同的处理


上一篇:1. Two Sum

下一篇:leetcode485

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表