File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 11unit Horse.HandleException;
2+
23{ $IF DEFINED(FPC)}
34{ $MODE DELPHI}{ $H+}
45{ $ENDIF}
6+
57interface
68
79uses
810 { $IF DEFINED(FPC)}
9- SysUtils,
11+ SysUtils,
1012 { $ELSE}
11- System.SysUtils,
13+ System.SysUtils,
1214 { $ENDIF}
1315 Horse, Horse.Commons;
1416
@@ -18,9 +20,9 @@ implementation
1820
1921uses
2022 { $IF DEFINED(FPC)}
21- fpjson, TypInfo;
23+ fpjson, TypInfo;
2224 { $ELSE}
23- System.JSON, System.TypInfo;
25+ System.JSON, System.TypInfo;
2426 { $ENDIF}
2527
2628procedure SendError (ARes:THorseResponse; AJson: TJSONObject; AStatus: Integer);
@@ -58,7 +60,7 @@ procedure HandleException(Req: THorseRequest; Res: THorseResponse; Next: {$IF DE
5860 LJSON.{ $IF DEFINED(FPC)} Add{ $ELSE} AddPair{ $ENDIF} (' code' , { $IF DEFINED(FPC)} TJSONIntegerNumber{ $ELSE} TJSONNumber{ $ENDIF} .Create(E.Code));
5961 end ;
6062
61- if E.&Type <> TMessageType.Error then
63+ if E.&Type <> TMessageType.Default then
6264 begin
6365 LJSON.{ $IF DEFINED(FPC)} Add{ $ELSE} AddPair{ $ENDIF} (' type' , GetEnumName(TypeInfo(TMessageType), Integer(E.&Type )));
6466 end ;
You can’t perform that action at this time.
0 commit comments