mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 10:39:39 +02:00
+ Exception.GetBaseException
This commit is contained in:
parent
b0459a19f4
commit
18e0979379
@ -119,7 +119,9 @@ type
|
|||||||
constructor CreateResHelp(ResString: PString; AHelpContext: Longint);
|
constructor CreateResHelp(ResString: PString; AHelpContext: Longint);
|
||||||
constructor CreateResFmtHelp(ResString: PString; const Args: array of const;
|
constructor CreateResFmtHelp(ResString: PString; const Args: array of const;
|
||||||
AHelpContext: Longint);
|
AHelpContext: Longint);
|
||||||
Function ToString : String; override;
|
Function ToString : String; override;
|
||||||
|
|
||||||
|
function GetBaseException : Exception;virtual;
|
||||||
|
|
||||||
property HelpContext : longint read fhelpcontext write fhelpcontext;
|
property HelpContext : longint read fhelpcontext write fhelpcontext;
|
||||||
property Message : string read fmessage write fmessage;
|
property Message : string read fmessage write fmessage;
|
||||||
@ -271,7 +273,7 @@ generic function IfThen<T>(val:boolean;const iftrue:T; const iffalse:T) :T; inli
|
|||||||
|
|
||||||
Var
|
Var
|
||||||
OnShowException : Procedure (Msg : ShortString);
|
OnShowException : Procedure (Msg : ShortString);
|
||||||
|
|
||||||
Const
|
Const
|
||||||
HexDisplayPrefix : string = '$';
|
HexDisplayPrefix : string = '$';
|
||||||
|
|
||||||
@ -326,7 +328,7 @@ Type
|
|||||||
|
|
||||||
{ Type Helpers}
|
{ Type Helpers}
|
||||||
{$i syshelph.inc}
|
{$i syshelph.inc}
|
||||||
|
|
||||||
procedure FreeAndNil(var obj);
|
procedure FreeAndNil(var obj);
|
||||||
procedure FreeMemAndNil(var p);
|
procedure FreeMemAndNil(var p);
|
||||||
|
|
||||||
|
@ -254,6 +254,19 @@ end;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function Exception.GetBaseException : Exception;
|
||||||
|
var
|
||||||
|
_ExceptObjectStack : PExceptObject;
|
||||||
|
begin
|
||||||
|
_ExceptObjectStack:=RaiseList;
|
||||||
|
While Assigned(_ExceptObjectStack) do
|
||||||
|
begin
|
||||||
|
result:=Exception(_ExceptObjectStack^.FObject);
|
||||||
|
_ExceptObjectStack:=_ExceptObjectStack^.Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
Constructor EVariantError.CreateCode (Code : longint);
|
Constructor EVariantError.CreateCode (Code : longint);
|
||||||
begin
|
begin
|
||||||
case Code of
|
case Code of
|
||||||
|
Loading…
Reference in New Issue
Block a user