Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWError.html not rendered from raised exception in servercontroller
#10
(04-05-2019, 12:05 AM)Craig Burke Wrote: Hi Alexandre,

In my case:
<code>
procedure TIWServerController.IWServerControllerBaseNewSession(
 ASession: TIWApplication);
begin
 if  GSessions.IsValidSession(ASession) then
   begin
     ASession.Data := TIWUserSession.Create(nil, ASession);
     UserSession.Initialize;    // most likely it will occur here due to invalid connectionname, sql access denied, etc...
   end;
end;
</code>

In your Demo SubclassingExceptionRenderer :
<code>
procedure TIWServerController.IWServerControllerBaseNewSession(
 ASession: TIWApplication);
begin
 ASession.Data := TIWUserSession.Create(nil);
 raise Exception.Create('test Error Message');  // no message appears and the browser is blank
end;
</code>

Thank you,
Craig

The issue here is that the server is returning status code 500 (which is correct), however the code loading the page expects status code 200. Latest IW 15 code base has a different code and it works, but I'll need to back port the fix to IW 14 code base. I'll see if it is at least feasible and get back to you, OK?
Reply


Messages In This Thread
RE: IWError.html not rendered from raised exception in servercontroller - by Alexandre Machado - 04-15-2019, 10:42 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)