Surround NotAuthorizedException with try catch in the force-methods of TaskService #2162
This commit is contained in:
parent
9d04449779
commit
7fdbaccae0
|
@ -236,8 +236,14 @@ public interface TaskService {
|
|||
Task forceCancelClaim(String taskId)
|
||||
throws TaskNotFoundException,
|
||||
InvalidOwnerException,
|
||||
NotAuthorizedOnWorkbasketException,
|
||||
InvalidTaskStateException;
|
||||
InvalidTaskStateException {
|
||||
try {
|
||||
return this.cancelClaim(taskId, true);
|
||||
} catch (NotAuthorizedOnWorkbasketException e) {
|
||||
throw new SystemException(
|
||||
"this should not have happened. You've discovered a new bug! :D", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Request review for an existing {@linkplain Task} that is in {@linkplain TaskState#CLAIMED}.
|
||||
|
|
Loading…
Reference in New Issue