Changeset 15438

Show
Ignore:
Timestamp:
14.05.2008 13:28:04 (11 years ago)
Author:
ak19
Message:

RemoteException? cause is shown so that the actual reasons for exceptions are not left unexplained on the clien end

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/trunk/gs3-webservices-democlient/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Exception.java

    r15222 r15438  
    170170            if(cause == null) 
    171171                return super.getMessage(); 
    172              
     172 
    173173            if(cause instanceof RemoteException) { 
    174174                // specifically indicate it's a RemoteException (as it encapsulates 
    175175                // different exception classes)  
    176                 msg = "(RemoteException): problem invoking web service, " + 
    177                     "possibly trouble finding " + specifics; 
     176                msg = "(RemoteException): problem invoking web service"; 
     177                if(specifics != null && !specifics.equals("")) { 
     178                    msg += ", possibly trouble finding " + specifics; 
     179                } 
     180                // Some info on what caused the Remote Exception: 
     181                msg += ".\nCause: " + cause.getMessage(); 
    178182            } else if(cause instanceof UnsupportedEncodingException) { 
    179183                msg = "(UnsupportedEncodingException): trouble converting "