📄 exceptionclass.pas
字号:
////////////////////////////////////////////////////////////////////////////////
//
//
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -