文件名称:ExceptionHandle
- 所属分类:
- 系统编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 13kb
- 下载次数:
- 0次
- 提 供 者:
- kic****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Preventing application crash by using exception handling mechanism.
The ExceptionTest project example demonstrate how to avoid application crash, by using the __try and __except statements. When you run the sample, you get a dialog-box containing 2 buttons that deliberately causes an exception. The first button raises the exception without exception handling block, and this causes the application to crash immediately. The second button raises the exception from within a __try block. When the exception is occurred, the function inside the __except statement (GetExceptionInformation) is called. This function displays a special dialog-box with a little information about the exception, and allow the user to decide whether he wants to continue to run the program or to terminate it.
The ExceptionTest project example demonstrate how to avoid application crash, by using the __try and __except statements. When you run the sample, you get a dialog-box containing 2 buttons that deliberately causes an exception. The first button raises the exception without exception handling block, and this causes the application to crash immediately. The second button raises the exception from within a __try block. When the exception is occurred, the function inside the __except statement (GetExceptionInformation) is called. This function displays a special dialog-box with a little information about the exception, and allow the user to decide whether he wants to continue to run the program or to terminate it.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ExceptionHandle\ExceptionTest.dsp
...............\ExceptionTest.dsw
...............\main.cpp
...............\myexcep.cpp
...............\myexcep.h
...............\resource.h
...............\Script1.aps
...............\Script1.rc
ExceptionHandle
...............\ExceptionTest.dsw
...............\main.cpp
...............\myexcep.cpp
...............\myexcep.h
...............\resource.h
...............\Script1.aps
...............\Script1.rc
ExceptionHandle