1
0
mirror of synced 2024-11-08 22:29:16 +00:00
x2log/X2Log.Exception.madExceptHandler.pas

40 lines
880 B
ObjectPascal
Raw Normal View History

unit X2Log.Exception.madExceptHandler;
2014-05-18 18:09:07 +00:00
interface
uses
System.SysUtils,
X2Log.Intf,
X2Log.Exception.Default;
type
TX2LogmadExceptExceptionStrategy = class(TX2LogDefaultExceptionStrategy)
public
{ IX2LogExceptionStrategy }
2017-04-26 15:20:48 +00:00
procedure Execute(AException: Exception; out AMessage: string; AAddDetails: TX2LogExceptionDetailsProc); override;
2014-05-18 18:09:07 +00:00
end;
implementation
uses
madExcept,
X2Log.Details.Default;
2014-05-18 18:09:07 +00:00
{ TX2LogmadExceptExceptionStrategy }
2017-04-26 15:20:48 +00:00
procedure TX2LogmadExceptExceptionStrategy.Execute(AException: Exception; out AMessage: string; AAddDetails: TX2LogExceptionDetailsProc);
var
bugReport: string;
2014-05-18 18:09:07 +00:00
begin
2017-04-26 15:20:48 +00:00
inherited Execute(AException, AMessage, AAddDetails);
2014-05-18 18:09:07 +00:00
2017-04-26 15:20:48 +00:00
bugReport := madExcept.CreateBugReport(etNormal, AException);
if Length(bugReport) > 0 then
AAddDetails('StackTrace', bugReport);
2014-05-18 18:09:07 +00:00
end;
end.