CommandContext Logs and Re-throws Exceptions

Description

CommandContext.close() logs exceptions at SEVER and subsequently re-throws them.

This code should:

  1. Not log the final exception. (Preferable since they are being re-thrown) or

  2. 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.

Environment

None

Assignee

Joram Barrez

Reporter

Brady Ellison

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure