File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ procedure HandleException(Req: THorseRequest; Res: THorseResponse; Next: {$IF DE
4242 raise;
4343 on E: EHorseException do
4444 begin
45- LJSON := TJSONObject.ParseJSONValue(E.ToJSON) as TJSONObject;
45+ LJSON := { $IF DEFINED(FPC) } GetJSON(E.ToJSON) as TJSONObject{ $ELSE } TJSONObject .ParseJSONValue(E.ToJSON) as TJSONObject{ $ENDIF } ;
4646 SendError(Res, LJSON, Integer(E.Status));
4747 end ;
4848 on E: Exception do
4949 begin
5050 LStatus := Res.Status;
51- if LStatus < Integer(THTTPStatus.BadRequest) then
51+ if ( LStatus < Integer(THTTPStatus.BadRequest) ) then
5252 LStatus := Integer(THTTPStatus.InternalServerError);
5353 LJSON := TJSONObject.Create;
5454 LJSON.{ $IF DEFINED(FPC)} Add{ $ELSE} AddPair{ $ENDIF} (' error' , E.Message);
You can’t perform that action at this time.
0 commit comments