mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 05:23:14 +00:00
Merge pull request #8108 from tdonohue/dont_swallow_exceptions
Ensure SubmissionService doesn't swallow root exceptions
This commit is contained in:
@@ -250,7 +250,7 @@ public class SubmissionService {
|
|||||||
id = Integer.parseInt(split[1]);
|
id = Integer.parseInt(split[1]);
|
||||||
wsi = workspaceItemService.find(context, id);
|
wsi = workspaceItemService.find(context, id);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
throw new UnprocessableEntityException("The provided workspaceitem URI is not valid");
|
throw new UnprocessableEntityException("The provided workspaceitem URI is not valid", e);
|
||||||
}
|
}
|
||||||
if (wsi == null) {
|
if (wsi == null) {
|
||||||
throw new UnprocessableEntityException("Workspace item is not found");
|
throw new UnprocessableEntityException("Workspace item is not found");
|
||||||
@@ -265,7 +265,7 @@ public class SubmissionService {
|
|||||||
wi = workflowService.start(context, wsi);
|
wi = workflowService.start(context, wsi);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException("The workflow could not be started for workspaceItem with" +
|
throw new RuntimeException("The workflow could not be started for workspaceItem with" +
|
||||||
"id: " + id);
|
" id: " + id, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return wi;
|
return wi;
|
||||||
|
Reference in New Issue
Block a user