diff --git a/Source/Core/WiRL.Core.Exceptions.pas b/Source/Core/WiRL.Core.Exceptions.pas index bf31ff3..a587c97 100755 --- a/Source/Core/WiRL.Core.Exceptions.pas +++ b/Source/Core/WiRL.Core.Exceptions.pas @@ -372,7 +372,10 @@ constructor EWiRLWebApplicationException.Create(const AMessage: string; AStatus: Create(AMessage, AStatus); if Assigned(AData) then + begin + FData.Free; FData := (AData.Clone as TJSONObject); + end; end; constructor EWiRLWebApplicationException.Create(AInnerException: Exception; diff --git a/Source/Core/WiRL.Core.MessageBody.Default.pas b/Source/Core/WiRL.Core.MessageBody.Default.pas index b4092ca..653f3cb 100644 --- a/Source/Core/WiRL.Core.MessageBody.Default.pas +++ b/Source/Core/WiRL.Core.MessageBody.Default.pas @@ -674,7 +674,9 @@ procedure TWiRLExceptionWriter.WriteTo(const AValue: TValue; const AAttributes: LErr := AValue.AsObject as Exception; LJSON := TNeon.ObjectToJSON(LErr, LConfig); try - (LJSON as TJSONObject).AddPair('exception', LErr.ClassName); + // Don't add 'exception' pair for EWiRLWebApplicationException (already has its own Exception property) + if not (LErr is EWiRLWebApplicationException) then + (LJSON as TJSONObject).AddPair('exception', LErr.ClassName); if FWiRLConfigErrors.ErrorDebugInfo then begin // Using TNeonCase algorithm diff --git a/Source/IDE Wizard/WiRL.Wizards.pas b/Source/IDE Wizard/WiRL.Wizards.pas index b20adab..c2459f3 100644 --- a/Source/IDE Wizard/WiRL.Wizards.pas +++ b/Source/IDE Wizard/WiRL.Wizards.pas @@ -264,7 +264,7 @@ function TWiRLResourceModuleWizard.GetGalleryCategory: IOTAGalleryCategory; Result := (BorlandIDEServices as IOTAGalleryCategoryManager).FindCategory(SIDString); end; -function TWiRLResourceModuleWizard.GetGlyph: Cardinal; +function TWiRLResourceModuleWizard.GetGlyph: {$IFDEF WIN32}Cardinal{$ELSE}UInt64{$ENDIF}; begin { TODO : function TWiRLServeProjectWizard.GetGlyph: Cardinal; } Result := LoadIcon(HInstance, 'WiRLServerWizardIcon');