CommandContext.close() logs exceptions at SEVER and subsequently re-throws them.
This code should:
Not log the final exception. (Preferable since they are being re-thrown) or
Log the final exception at a lower level. (FINE at most since it is being re-thrown)
Certain exceptions can be expected and handled gracefully. For example, UPSERT where on duplicate key, update has an exception that is entirely expected. With the current design I am forced to ignore all errors originating from the class or allow sever messages to propagate through my logging framework.
CommandContext.exception(Throwable) already handles logging masked exceptions. By turning off the extra layer of logging, no information is lost.