2014-05-18 18:09:07 +00:00
|
|
|
unit X2Log.Exception.Default;
|
|
|
|
|
|
|
|
interface
|
|
|
|
uses
|
|
|
|
System.SysUtils,
|
|
|
|
|
|
|
|
X2Log.Intf;
|
|
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
TX2LogDefaultExceptionStrategy = class(TInterfacedObject, IX2LogExceptionStrategy)
|
|
|
|
public
|
|
|
|
{ IX2LogExceptionStrategy }
|
2014-05-30 12:51:01 +00:00
|
|
|
procedure Execute(AException: Exception; var AMessage: string; var ADetails: IX2LogDetails); virtual;
|
2014-05-18 18:09:07 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
|
|
{ TX2LogDefaultExceptionStrategy }
|
2014-05-30 12:51:01 +00:00
|
|
|
procedure TX2LogDefaultExceptionStrategy.Execute(AException: Exception; var AMessage: string; var ADetails: IX2LogDetails);
|
2014-05-18 18:09:07 +00:00
|
|
|
begin
|
|
|
|
if Length(AMessage) > 0 then
|
|
|
|
AMessage := AMessage + ': ';
|
|
|
|
|
|
|
|
AMessage := AMessage + AException.Message;
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|