Ensuring that any inner exceptions of sqlexceptions are logged if appropriate