Hi, On application level there is an onError event. Can we use this event to trap the errors that are raised by Formspider and maybe show them in a different way then showing the little error button? Maybe trap them and display them in a popup dialog or on a panel somewhere? Thanks, Michiel |
Hi Michiel, Yes, onError event prevents the error icon to be shown. You can use your own error alert or panel to show the error message. You can use api_exception.getException api in your onError action code to get the error details. Below is a sample onError procedure:
Hi Ugur, I tested this code and is does catch the the fact that an exception occurred in the Formspider API's. But if i raise an exception myself (raise e_some_exception) and write an error text with api_error.log, this code catches only that a user defined exception occurred, but does not show the api_error.log messages. In this case the error icon still appears, and when i click on the icon, the error text messages i logged do appear. Is there any way to combine this, so that all errors raised are captured?
(05 Jul '12, 00:21)
Michiel A
We can not track the name of the PL/SQL exception raised by the developer because of PL/SQL limitations. So the best way to handle your own exceptions in the onError is:
PS: api_error.log causes error icon to be shown even onError is defined. If the above solution does not fit your needs we can update the api or create a new api?
(05 Jul '12, 03:10)
Ugur Kocak ♦
I think i would like the onError trigger to catch all exceptions and at the same time display the api_error.log messages. That way you could have 1 central point where it all comes together. You could then for example if you want to raise an exception in your app, first log some explanation with api_error.log and then raise. Then the onError will show both the api_error.log messages and the exception itself (user defined exception..) I will put this on my list of issues to be discussed, thanks.
(05 Jul '12, 05:04)
Michiel A
Hi Michiel, I told to the team about api_error.log. We accept it is a bug. OnError event will also prevent api_error.log messages to appear on the UI. We will also implement a new api to get the api_error.log messages.
(06 Jul '12, 05:18)
Ugur Kocak ♦
Hi Ugur, Great, thanks alot. Michiel
(06 Jul '12, 11:39)
Michiel A
|