The handle exception in Delphi is completely inconsistent.
The handle exception in Delphi is completely inconsistent.
There are two variables in system.classes:
ApplicationHandleException: procedure (sender: TObject) object = nil;
ApplicationShowException: procedure (E: Exception) object = nil;
In help writen:
Specifies the procedure that is called for the exception processing.
Determines the type of function that is responsible for handling with the exception of E.
and
Specifies the procedure that is called when an exception is made.
Determines the type of function that is responsible for displaying the exception E.
If the other methods is assigned to this vars, It das not works. Delphi still call methods HandleException and ShowException from TApplication class in VCL.Forms and FMX.Forms.
Resons:
1. in lot of place in exception part delphi still direct call TApplication.HandleException.
2 in lot of place is add call ApplicaitionHandleException but also in inconsistent way
3. in TApplication.Run method of VCL.Forms and FMX.Forms delphi direct call TApplication.HandleException.
4. in TApplication.HandleException delphi call direct TApplication.ShowException (VCL and FMX)
5. in some place direct call System.SysUtils.ShowException not even try call ApplicationHandleException or ApplicationShowException or even TApplication.HandleException or TApplication.ShowException
There are two variables in system.classes:
ApplicationHandleException: procedure (sender: TObject) object = nil;
ApplicationShowException: procedure (E: Exception) object = nil;
In help writen:
Specifies the procedure that is called for the exception processing.
Determines the type of function that is responsible for handling with the exception of E.
and
Specifies the procedure that is called when an exception is made.
Determines the type of function that is responsible for displaying the exception E.
If the other methods is assigned to this vars, It das not works. Delphi still call methods HandleException and ShowException from TApplication class in VCL.Forms and FMX.Forms.
Resons:
1. in lot of place in exception part delphi still direct call TApplication.HandleException.
2 in lot of place is add call ApplicaitionHandleException but also in inconsistent way
3. in TApplication.Run method of VCL.Forms and FMX.Forms delphi direct call TApplication.HandleException.
4. in TApplication.HandleException delphi call direct TApplication.ShowException (VCL and FMX)
5. in some place direct call System.SysUtils.ShowException not even try call ApplicationHandleException or ApplicationShowException or even TApplication.HandleException or TApplication.ShowException
How does third party exception tools like MadExcept and EurekaLog deal with this?
ReplyDeletei don't know, maybe don't change ApplicationxxxxException Vars. In standard behavior ApplicationxxxException vars is setting to TApplication.HandleException and TApplication.SHowException
ReplyDelete