2014-07-22 15:20:54 +00:00
|
|
|
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
|
2014-05-30 12:51:01 +00:00
|
|
|
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.
|