Revision 9024
Added by Jing Tao over 9 years ago
D1NodeService.java | ||
---|---|---|
217 | 217 |
localId = IdentifierManager.getInstance().getLocalId(pid.getValue()); |
218 | 218 |
} catch (McdbDocNotFoundException e) { |
219 | 219 |
throw new NotFound("1340", "The object with the provided " + "identifier was not found."); |
220 |
} catch (SQLException e) { |
|
221 |
throw new ServiceFailure("1350", "The object with the provided " + "identifier "+pid.getValue()+" couldn't be identified since "+e.getMessage()); |
|
220 | 222 |
} |
221 | 223 |
|
222 | 224 |
try { |
... | ... | |
572 | 574 |
throw new NotFound("1020", "The object specified by " + |
573 | 575 |
pid.getValue() + |
574 | 576 |
" does not exist at this node."); |
577 |
} catch (SQLException e) { |
|
578 |
throw new ServiceFailure("1030", "The object specified by "+ pid.getValue()+ |
|
579 |
" couldn't be identified at this node since "+e.getMessage()); |
|
575 | 580 |
} |
576 | 581 |
|
577 | 582 |
// check for authorization |
... | ... | |
1206 | 1211 |
" should have been in the identifier table, but it wasn't: " + |
1207 | 1212 |
e.getMessage()); |
1208 | 1213 |
|
1214 |
} catch (SQLException e) { |
|
1215 |
throw new ServiceFailure("1030", "D1NodeService.insertOrUpdateDocument() -"+ |
|
1216 |
" couldn't identify if the pid "+pid.getValue()+" is in the identifier table since "+e.getMessage()); |
|
1209 | 1217 |
} |
1210 | 1218 |
|
1211 | 1219 |
} |
... | ... | |
1451 | 1459 |
} catch (McdbDocNotFoundException e) { |
1452 | 1460 |
// do nothing, no localId to log with |
1453 | 1461 |
logMetacat.warn("Could not log 'updateSystemMetadata' event because no localId was found for pid: " + pid.getValue()); |
1462 |
} catch (SQLException e) { |
|
1463 |
logMetacat.warn("Could not log 'updateSystemMetadata' event because the localId couldn't be identified for the pid: " + pid.getValue()); |
|
1454 | 1464 |
} |
1455 | 1465 |
|
1456 | 1466 |
return true; |
... | ... | |
1601 | 1611 |
localId = IdentifierManager.getInstance().getLocalId(pid.getValue()); |
1602 | 1612 |
} catch (McdbDocNotFoundException e) { |
1603 | 1613 |
throw new NotFound("1340", "The object with the provided " + "identifier was not found."); |
1614 |
} catch (SQLException e) { |
|
1615 |
throw new ServiceFailure("1350", "The object with the provided identifier "+pid.getValue()+" couldn't be identified since "+e.getMessage()); |
|
1604 | 1616 |
} |
1605 | 1617 |
|
1606 | 1618 |
// does the subject have archive (a D1 CHANGE_PERMISSION level) privileges on the pid? |
Also available in: Unified diff
Fixed a bug that the method getLocalId swallowed an exception incorrectly in the IdentifierManager.