Revision 5415
Added by berkley over 14 years ago
src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java | ||
---|---|---|
713 | 713 |
} catch (IOException e) { |
714 | 714 |
e.printStackTrace(); |
715 | 715 |
ServiceFailure sf = new ServiceFailure("1030", |
716 |
"Error in ResourceHandler.getObject: " + e.getMessage()); |
|
716 |
"IO Error in ResourceHandler.getObject: " + e.getMessage()); |
|
717 |
serializeException(sf, out); |
|
718 |
} catch(NumberFormatException ne) { |
|
719 |
InvalidRequest ir = new InvalidRequest("1030", "Invalid format for parameter: " + ne.getMessage()); |
|
720 |
serializeException(ir, out); |
|
721 |
} catch (Exception e) { |
|
722 |
e.printStackTrace(); |
|
723 |
ServiceFailure sf = new ServiceFailure("1030", |
|
724 |
"Exception " + e.getClass().getName() + " raised while handling listObjects request: " + |
|
725 |
e.getMessage()); |
|
717 | 726 |
serializeException(sf, out); |
718 | 727 |
} |
719 | 728 |
} |
src/edu/ucsb/nceas/metacat/dataone/CrudService.java | ||
---|---|---|
493 | 493 |
} |
494 | 494 |
|
495 | 495 |
String dateSMM = d.getField("dateSysMetadataModified"); |
496 |
//System.out.println("docid: " + d.docid + " dateSMM: " + dateSMM); |
|
496 | 497 |
if((startTime != null || endTime != null) && dateSMM == null) |
497 | 498 |
{ //if startTime or endTime are not null, we need a date to compare to |
498 | 499 |
continue; |
Also available in: Unified diff
added new exception handling to serialize number format exceptions for rest calls