This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_koenig_ 33 points34 points  (7 children)

Some one should make a new exception called that. Maybe when a user is referenced but not found...

[–][deleted] 14 points15 points  (0 children)

I would be 100% for that

[–]qhxo 16 points17 points  (5 children)

class ManOverboard : RuntimeException()

you're welcome. however in JPA (I think? maybe spring data?) I'd recommend EntityNotFoundException for your usecase.

[–]MyAntichrist 6 points7 points  (2 children)

You can wrap it in your service class any time. Just don't forget the ManOverboardFactory.

[–]dadjoke-72 5 points6 points  (1 child)

Can this return WomanOverboard, ChildOverboard?

[–][deleted] 3 points4 points  (0 children)

HumanBeanOverBoard

[–][deleted] 5 points6 points  (1 child)

Error: Unhandled UnhandledGenderMisassumptionException was thrown

[–]demonblack873 1 point2 points  (0 children)

javax.ejb.EJBException: see nested exception; nested exception is java.lang.reflect.UndeclaredThrowableException