Hi,

I may be asking a very stupid question, but please bear with me. I am
building a gwt application using a MVP architecture. My question is:
what is the right way of logging exceptions on the server (for which
you need to catch them) while at the same time throwing exceptions to
the client. I was thinking of doing the following way:

<code>
//Server side
public class ServiceImpl extends RemoteServiceServlet implements
Service{

public boolean myMethod() throws Exception {

       try{
        //do something which might throw exception
         }catch(Exception ex){
                  logger.log(...);
                  throw ex; // is this right?
        }
    }
}

</code>

Then on the client side it will be handled in onFailure() method.

Is this the right way of doing things? Having try catch block for
logging purposes on server side
and also throwing the exception so that it could reach the client?

Thanks,
Wasim

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to