Changeset 5921 for ComponentRegistry
- Timestamp:
- 01/16/15 09:01:12 (9 years ago)
- Location:
- ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/MDMarshaller.java
r3091 r5921 4 4 import java.io.ByteArrayInputStream; 5 5 import java.io.ByteArrayOutputStream; 6 import java.io.File;7 import java.io.FileInputStream;8 import java.io.IOException;9 6 import java.io.InputStream; 10 7 import java.io.OutputStream; -
ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/rest/ComponentRegistryRestService.java
r5872 r5921 368 368 try { 369 369 registry.getMDComponentAsXml(componentId, output); 370 } catch (ItemNotFoundException e 1) {371 LOG.warn("Could not retrieve component {} ",372 componentId );373 LOG.debug("Details", e 1);374 throw new WebApplicationException( e1,Response370 } catch (ItemNotFoundException e) { 371 LOG.warn("Could not retrieve component {}: {}", 372 componentId, e.getMessage()); 373 LOG.debug("Details", e); 374 throw new WebApplicationException(Response 375 375 .serverError() 376 376 .status(Status.INTERNAL_SERVER_ERROR) … … 378 378 } 379 379 } catch (ComponentRegistryException e) { 380 LOG.warn("Could not retrieve component {} ",381 componentId );380 LOG.warn("Could not retrieve component {}: {}", 381 componentId, e.getMessage()); 382 382 LOG.debug("Details", e); 383 throw new WebApplicationException( e,Response383 throw new WebApplicationException(Response 384 384 .serverError() 385 385 .status(Status.INTERNAL_SERVER_ERROR) … … 402 402 try { 403 403 registry.getMDComponentAsXsd(componentId, output); 404 } catch (ItemNotFoundException e 1) {405 LOG.warn("Could not retrieve component {} ",406 componentId );407 LOG.debug("Details", e 1);408 throw new WebApplicationException( e1,Response404 } catch (ItemNotFoundException e) { 405 LOG.warn("Could not retrieve component {}: {}", 406 componentId, e.getMessage()); 407 LOG.debug("Details", e); 408 throw new WebApplicationException(Response 409 409 .serverError() 410 410 .status(Status.INTERNAL_SERVER_ERROR) … … 412 412 } 413 413 } catch (ComponentRegistryException e) { 414 LOG.warn("Could not retrieve component {} ",415 componentId );414 LOG.warn("Could not retrieve component {}: {}", 415 componentId, e.getMessage()); 416 416 LOG.debug("Details", e); 417 throw new WebApplicationException( e,Response417 throw new WebApplicationException(Response 418 418 .serverError() 419 419 .status(Status.INTERNAL_SERVER_ERROR) … … 1196 1196 registry.getMDProfileAsXml(profileId, output); 1197 1197 } catch (Exception e) { 1198 LOG.warn("Could not retrieve component {} ",1199 profileId );1198 LOG.warn("Could not retrieve component {}: {}", 1199 profileId, e.getMessage()); 1200 1200 LOG.debug("Details", e); 1201 throw new WebApplicationException( e,Response1201 throw new WebApplicationException(Response 1202 1202 .serverError() 1203 1203 .status(Status.INTERNAL_SERVER_ERROR) … … 1214 1214 registry.getMDProfileAsXsd(profileId, output); 1215 1215 } catch (Exception e) { 1216 LOG.warn("Could not retrieve component {} ",1217 profileId );1216 LOG.warn("Could not retrieve component {}: {}", 1217 profileId, e.getMessage()); 1218 1218 LOG.debug("Details", e); 1219 throw new WebApplicationException( e,Response1219 throw new WebApplicationException(Response 1220 1220 .serverError() 1221 1221 .status(Status.INTERNAL_SERVER_ERROR)
Note: See TracChangeset
for help on using the changeset viewer.