(1) would always remain an InvocationException (2) : taken the case that you actually are not using RPC to intentionally use exceptions as means of validation performed in your business logic (i.e. CustomerFraudCheckException), you could declare a RuntimeException which implements Serializable, write a servlet filter around your application, catch each exception (Throwable?) originating from the servlet and wrap it into an instance of your new exception type. Thus most server exception should reach your client, with the noticeable exception of exceptions originating in RPC or the java transport layer.
However it does not seem a good idea imo to do that at all. You should rather check the HTTP response code (I think in 1.5 they added access to the request object in GWT, no?). In case of a server error you will get different response codes than in case of a broken connection On Sep 4, 10:02 pm, JN <[EMAIL PROTECTED]> wrote: > i want to display appropriate messages if (1) the client is > disconnected from the internet, or (2) there is a server error. > > for (1), i get "com.google.gwt.user.client.rpc.InvocationException:" > > for (2), i get "com.google.gwt.user.client.rpc.InvocationException: > The call failed on the server; see server log for details" > > should i distinguish using these messages, or is their a better > approach? > thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
