Changeset 15438


Ignore:
Timestamp:
2008-05-14T13:28:04+12:00 (16 years ago)
Author:
ak19
Message:

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

File:
1 edited

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 "
Note: See TracChangeset for help on using the changeset viewer.