Log nested exception when handleException fails
Added a test for closed connection handling
A bit of refactoring/commenting on test

This was temporarily failing on my machine because my sql layer was running really slow