exceptionclass.pas
来自「含此文档只表示此压缩包来自于DELPHI盒子网站 ------------」· PAS 代码 · 共 51 行
PAS
51 行
////////////////////////////////////////////////////////////////////////////////
//
//
// FileName : clsinherit.pas
// Creator : Shen Min
// Date : 2002-2-10
// Comment : Exception Class Demo for <<delphi after high hand>>
//
//
////////////////////////////////////////////////////////////////////////////////
unit ExceptionClass;
interface
uses SysUtils, Dialogs;
type
EFileOpenFailed = class(Exception)
public
procedure Warning; virtual; abstract;
end;
EFileNotFound = class(EFileOpenFailed)
public
procedure Warning; override;
end;
EFileFormatErr = class(EFileOpenFailed)
public
procedure Warning; override;
end;
implementation
{ EFileNotFound }
procedure EFileNotFound.Warning;
begin
ShowMessage('真是不可思议,竟然找不到文件!');
end;
{ EFileFormatErr }
procedure EFileFormatErr.Warning;
begin
ShowMessage('更不可思议的是,文件格式不对!');
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?