andersa@ellenshoej.dk Posted June 9, 2011 Share Posted June 9, 2011 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 More sharing options...
Administrators Farshad Mohajeri Posted June 9, 2011 Administrators Share Posted June 9, 2011 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 More sharing options...
andersa@ellenshoej.dk Posted June 9, 2011 Author Share Posted June 9, 2011 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. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 9, 2011 Administrators Share Posted June 9, 2011 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 More sharing options...
andersa@ellenshoej.dk Posted June 10, 2011 Author Share Posted June 10, 2011 Well this could be my Delphi 2009 install acting up again at work. Will compare with Delphi XE when I get a chance. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 10, 2011 Administrators Share Posted June 10, 2011 OK. BTW, I did some modifications in exception handling logic. Link to comment Share on other sites More sharing options...
rsanford Posted August 17, 2011 Share Posted August 17, 2011 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 More sharing options...
rsanford Posted August 17, 2011 Share Posted August 17, 2011 I failed to mention that exception was found in the latest trace in the \log folder. I'd like to get a popup alert if possible. Thanks. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 17, 2011 Administrators Share Posted August 17, 2011 If this error happens inside a user operation then it should pop an exception window. By saying "user operation" I mean an event which is initiated from browser. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now