* Add some missing exception classes

(cherry picked from commit 6eac18e8c1)
This commit is contained in:
Michaël Van Canneyt 2023-11-19 16:19:48 +01:00 committed by marcoonthegit
parent 5d687aa7e1
commit d00b2e5c6b
2 changed files with 31 additions and 0 deletions

View File

@ -204,6 +204,7 @@ type
EInvalidInsert = class(Exception);
EPackageError = class(Exception);
ECFError = class(Exception);
EOSError = class(Exception)
public
@ -216,6 +217,12 @@ type
ENoDynLibsSupport = class(Exception);
EProgrammerNotFound = class(Exception);
EMonitor = class(Exception);
EMonitorLockException = class(EMonitor);
ENoMonitorSupportException = class(EMonitor);
EObjectDisposed = class(Exception);
ENotImplemented = class(Exception);
@ -229,10 +236,19 @@ type
EFileNotFoundException = class(Exception);
EPathNotFoundException = class(Exception);
EInOutArgumentException = class(EArgumentException)
public
Path: string;
constructor Create(const aMsg, aPath: string); overload;
constructor CreateRes(ResStringRec: PResStringRec; const aPath: string); overload;
end;
EInvalidOpException = class(Exception);
ENoConstructException = class(Exception);
EOperationCancelled = class(Exception);
{ Exception handling routines }
function ExceptObject: TObject;
function ExceptAddr: CodePointer;

View File

@ -299,6 +299,21 @@ end;
ErrCode:=Code;
end;
constructor EInOutArgumentException.Create(const aMsg, aPath: string); overload;
begin
Path:=aPath;
Inherited Create(aMsg);
end;
constructor EInOutArgumentException.CreateRes(ResStringRec: PResStringRec; const aPath: string); overload;
begin
Path:=aPath;
Inherited CreateRes(ResStringRec);
end;
{$if defined(win32) or defined(win64) or defined (wince)}
function EExternal.GetExceptionRecord: PExceptionRecord;
begin