Jump to content

Exception handling


andersa@ellenshoej.dk

Recommended Posts

Is it correct that Unigui suppresses exceptions? Is this the intended behaviour?

 

It creates some issues for me when debugging my app, because sometimes a procedure stops executing in the middle of it for no apparent reason. It then turns out later that it is because a subfunction raised an exception which Unigui does not show.

Link to comment
Share on other sites

  • Administrators

Server doesn't suppress exceptions, but can't allow them to escape. All exceptions that happens inside AJAX requests are caught and sent to web browser in form of alert().

Exceptions that happen outside of AJAX calls are caught and logged into log files under .\log folder.

 

Does your exceptions occur inside AJAX calls? Normally it should be case. I mean all user code should execute within context of an AJAX request.

Link to comment
Share on other sites

  • Administrators

Well I was doing some data processing from TUniComboBox.OnSelect event. I guess that should be within the context of an ajax request in web mode.

The thing is. I test everything in VCL mode first, so I might never notice that such an alert was triggered.

 

Yes OnSelect event is an AJAX request like all other events that are initiated from browser.

 

Alert is only triggered in web mode. In VCL you should see exceptions like a normal VCL app.

Link to comment
Share on other sites

  • 2 months later...

I seem to have a similar issue. I created a duplicate record/pk error. The error was logged in sql trace - Error: violation of PRIMARY or UNIQUE KEY constraint "PK_RFACILITY" on table "RFACILITY".

The error message was not displayed as an alert or message. Do I need to enable exception messages somewhere? Thanks

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...