Hi there can I catch specific exceptions instead o...
# exposed
s
Hi there can I catch specific exceptions instead of just a blanket exception (
ExposedSQLException
)? Right now I have to do string processing on the message given by the exception to perform any task. Something like
RefrentialIntegrityConstraintViolationException
or
UniqueConstraintViolationException
etc would be really helpful.
t
You can catch ExposedSQLException and then check
ex.cause is UniqueConstraintViolationException
👍 1