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. 写好异常处理方法
在程序的其他地方抛出异常时,程序就会调用处理异常的方法, 根据不同的异常给出不同的处理