Handlling GWT call failure -


Hello, I have a piece of code in GWT, a senior colleague of mine wrote this code.

  Public void (if held) on failure (if caught (for example stoppage exemption) (if JustedEd.Exception and caught. Messages) in it (" & Lt; title & gt; Error 500 unauthorized & lt; / title & gt; ") {Message Box. Alert (" The session has expired, press OK to redirect to the login page. ") ; History.newItem (HistoryToken.INDEX_PAGE.toString ());} Other {Message Box.Alert ("An exception occurred." Press OK to place it again. ");}} And if (instocateof invocationException) {messagebox .alert (" Sorry ... there was an error in accessing the server. ");}}   

and what is the probability of being executed (if in the case of invocation exploration) {block / block call on the server failed?

I think and if > Because InvocationExce Ption is the sub-class of RuntimeException (as is said), you are right. / P>

Does BTW compare strings on getMessage instead of checking status code with GetStatusCode ()? ()

Comments