Correct detection of actual SQLException exceptions