Home > Back-end >  Exception subclasses inherited problems
Exception subclasses inherited problems

Time:09-25

The custom of an Exception subclasses

TInetException=class (System. SysUtils. Exception)
Private
Protected
Procedure RaisingException (P: PExceptionRecord); Override.
Public
end;

Inherited RaisingException subclasses, but compile time error, E2037 Declaration of 'RaisingException \' differs from previous Declaration, why?

CodePudding user response:

Look at how the Exception statement RaisingException

CodePudding user response:

, the statement in the protected virtual

CodePudding user response:

refer to the second floor orxor response:
, the statement in the protected virtual
function prototype to stick out

CodePudding user response:

The unit System. In the SysUtils prototype statement
 
The Exception class=(TObject)
Private
FMessage: string;
FHelpContext: Integer;
FInnerException: Exception;
FStackInfo: Pointer;
FAcquireInnerException: Boolean;
The class constructor Create;
Class destructor Destroy;
Protected
Procedure SetInnerException;
Procedure SetStackInfo (AStackInfo: Pointer);
The function GetStackTrace: string;
//This virtual function will be called right before This exception is about to be
//raised. In the case of an external non - Delphi exception, this is called soon after
//the object is created since the "raise" condition is already in progress.
Procedure RaisingException (P: PExceptionRecord); Virtual;//inherited the

CodePudding user response:

Before TInetException statement defines another PExceptionRecord, lead to inconsistent with the original

CodePudding user response:

Private
Protected
Procedure RaisingException (P: PExceptionRecord); Override.
The public may be private protected the Exception in the public
  • Related