In a client-server relationship, should the server always rethrow the exception to the client?
        Posted  
        
            by dotnetdev
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by dotnetdev
        
        
        
        Published on 2010-06-01T22:01:37Z
        Indexed on 
            2010/06/01
            22:03 UTC
        
        
        Read the original article
        Hit count: 284
        
exception
|exception-handling
I have a set of web services (the server), and an app which consumes this (client). In this sort of relationship, should the server always throw exceptions (ie in the throw block, rethrow the caught exception), and the client catch this. Exceptions which the server can handle, it will deal with and not rethrow, but everything else will be thrown to the calling layer for further action (the consuming app can raise a msg box or whatever).
Is this a good example of an exception that can be dealt with: A file cannot be written because the directory requires special privileges, so if this raises an exception, the file is written somewhere which does not require admin rights.
Thanks
© Stack Overflow or respective owner