Well, that's confusing then. The JavaDoc for org.hibernate.engine.jdbc.spi.SqlExceptionHelper says:
Helper for handling SQLExceptions in various manners.
If it doesn't get thrown out of InsertRecord(), then the SQLException is being handled inside InsertRecord() or something that it calls. That handler might rethrow a ConstraintViolationException. I don't have Hibernate set up now, so I can't
test that. When you say, you see it in the debugger, do you mean an actual debugger stopped at a break point, or are you seeing it in a log file? If it's a break point, then at which line is it?
I can only think of a couple of ways the catch clause at lines 7 - 9 could fail to catch the exception:
1. The exception is thrown from somewhere else other than the try block.
2. There are more than one class named ContraintViolationException, but in different packages, and your imports are set so that you are not catching the type that is being thrown.
Those are pretty much the only possibilities.