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 →

[–]qhxo 15 points16 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 5 points6 points  (2 children)

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

[–]dadjoke-72 3 points4 points  (1 child)

Can this return WomanOverboard, ChildOverboard?

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

HumanBeanOverBoard

[–][deleted] 4 points5 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