Delphi之Raise抛出异常
2017-01-13 09:34
183 查看
相关资料:
http://blog.csdn.net/a20071426/article/details/10160171
实例代码:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var int1: Integer; begin try int1 := StrToInt('A'); except raise Exception.CreateFmt('%d = %s',[1001, '您的程序在Unit1单元32行出错了!']); end; end; end.
相关文章推荐
- Delphi之Raise抛出异常
- Delphi学习之Raise(抛出异常)
- oracle存储过程抛出异常之RAISE和RAISE_APPLICATION_ERROR
- Delphi 异常抛出与捕获
- Delphi捕捉DLL执行所抛出的异常。
- Raise抛出异常
- 使用RAISE_APPLICATION_ERROR抛出与oracle交互的异常
- Delphi捕捉DLL执行所抛出的异常。(转)
- raise抛出异常
- raise 语句: 抛出异常
- Delphi捕捉DLL执行所抛出的异常。
- jdbc 捕捉sql server raiseerror 方法抛出的异常
- python自定义异常和主动抛出异常(raise)
- 在国外一个开源项目摘出来的一个异常抛出DMP 类
- 异常什么时候抛出?
- 第7集 构造函数中抛出的异常
- Dubbo抛出自定义异常
- HttpClient连接池抛出大量ConnectionPoolTimeoutException: Timeout waiting for connection异常排查
- C# catch 块中可以俘获 SQL Server 抛出的自定义异常(RAISERROR)(轉)
- try{} catch(Exception e){}异常抛出与Spring事务回滚策略