Hi,
When a exception occurs inside a gwt servlet constructor, the browser is showing the exception in a MessageBox (like when calling SC.say()) with all the stack trace in it. The message box is huge, and in some cases the user can't read the message, because it is bigger than the available screen.
So, I want to deal with those exceptions.
How can I intercept in the client side a exception raised inside the servlet constructor?
When a exception ocurrs outside the constructor I'm proper dealing with it, because it is catch by the onFailure() method of the GWT AsyncCallBack.
But, when the exception is inside the servlet constructor, how can I catch it in my code?
I've tried to put in the onModuleLoad of my GWT EntryPoint:
But the onUncaughtException method is not being called when the exception is raised in the servlet constructor.
and also tried the following, to see if the exceptions is printed directly to the browser (as said in the GWT JavaDoc), but it is still being shown inside the SmartGwt MessageBox.:
Thanks,
Cerávolo
When a exception occurs inside a gwt servlet constructor, the browser is showing the exception in a MessageBox (like when calling SC.say()) with all the stack trace in it. The message box is huge, and in some cases the user can't read the message, because it is bigger than the available screen.
So, I want to deal with those exceptions.
How can I intercept in the client side a exception raised inside the servlet constructor?
When a exception ocurrs outside the constructor I'm proper dealing with it, because it is catch by the onFailure() method of the GWT AsyncCallBack.
But, when the exception is inside the servlet constructor, how can I catch it in my code?
I've tried to put in the onModuleLoad of my GWT EntryPoint:
Code:
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { @Override public void onUncaughtException(Throwable p_throwable) { LfwClientUtil.TreatException(p_throwable); } });
and also tried the following, to see if the exceptions is printed directly to the browser (as said in the GWT JavaDoc), but it is still being shown inside the SmartGwt MessageBox.:
Code:
GWT.setUncaughtExceptionHandler(null)
Cerávolo
Comment