Changeset 15439 for other-projects/trunk/gs3-webservices-democlient
- Timestamp:
- 2008-05-14T13:42:09+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/trunk/gs3-webservices-democlient/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Exception.java
r15438 r15439 162 162 } 163 163 164 164 /** Overloading getMessage() to return some details as to what 165 165 * exactly went wrong. */ 166 166 public String getMessage() { … … 170 170 if(cause == null) 171 171 return super.getMessage(); 172 172 173 173 if(cause instanceof RemoteException) { 174 174 // specifically indicate it's a RemoteException (as it encapsulates … … 180 180 // Some info on what caused the Remote Exception: 181 181 msg += ".\nCause: " + cause.getMessage(); 182 } else if(cause instanceof UnsupportedEncodingException) { 182 } else { // Other kind of cause to exception: 183 if(cause instanceof UnsupportedEncodingException) { 183 184 msg = "(UnsupportedEncodingException): trouble converting " 184 185 + specifics + "returned " 185 186 + "from Fedora web services to " + FedoraConnection.UTF8; 186 } else if(cause instanceof SAXException) { 187 msg = "(SAXException): trouble parsing " 188 + specifics + " returned from web service"; 189 } else if(cause instanceof IOException) { 190 msg = "(IOException): trouble parsing " 191 + specifics + " returned from web service"; 192 } 193 /*else if(cause instanceof TransformerException) { 194 msg = msg + "(TransformerException) - trouble converting original XML " 195 + "response into String"; 196 }*/ 197 // else (other Exception, including FedoraVersionNotSupportedException) 198 // in those cases, just return it as it is. 199 200 // else msg = ""; 201 if(!msg.equals("")) 202 msg = " " + msg + ". "; 203 187 } else if(cause instanceof SAXException) { 188 msg = "(SAXException): trouble parsing " 189 + specifics + " returned from web service"; 190 } else if(cause instanceof IOException) { 191 msg = "(IOException): trouble parsing " 192 + specifics + " returned from web service"; 193 } /*else if(cause instanceof TransformerException) { 194 msg = msg + "(TransformerException) - trouble converting original XML " 195 + "response into String"; 196 }*/ 197 // else (other Exception, including FedoraVersionNotSupportedException) 198 // in those cases, just return it as it is. 199 // else msg = ""; 200 if(!msg.equals("")) 201 msg = " " + msg + ". "; 202 } 204 203 return this.getClass().getCanonicalName() 205 204 + msg + super.getMessage();
Note:
See TracChangeset
for help on using the changeset viewer.