Skip to content

Commit

Permalink
Always add the underlying cause of an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Jun 12, 2024
1 parent 712d96c commit 3816418
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Task createOrder(Order order) throws OrderCreationException {
newTask = taskService.create(newTask);
}
catch (DAOException e) {
throw new OrderCreationException("Exception occurred while creating task for order " + order.getId());
throw new OrderCreationException("Exception occurred while creating task for order " + order.getId(), e);
}
return newTask;
}
Expand Down Expand Up @@ -188,7 +188,7 @@ public Task createOrder(Encounter encounter) throws OrderCreationException {
newTask = taskService.create(newTask);
}
catch (DAOException e) {
throw new OrderCreationException("Exception occurred while creating task for encounter " + encounter.getId());
throw new OrderCreationException("Exception occurred while creating task for encounter " + encounter.getId(), e);
}
return newTask;
}
Expand Down

0 comments on commit 3816418

Please sign in to comment.