issue6291: attempting to (again) improve the exception handling