Skip to content

Commit

Permalink
Updated LabelService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
alina tarasova committed Apr 30, 2024
1 parent 8a92cd4 commit d6a1520
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/hexlet/code/service/LabelService.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public void delete(Long id) throws Exception {
labelRepository.deleteById(id);

} catch (ParentEntityExistsException ex) {
throw new ParentEntityExistsException("Label with id " + id

System.out.println("Label with id " + id
+ " is associated with the Task entity and cannot be deleted.");
}
}
Expand Down

0 comments on commit d6a1520

Please sign in to comment.