Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch only NoResults and IOError exceptions. #87

Merged
merged 2 commits into from Mar 16, 2018
Merged

Conversation

ktlim
Copy link
Contributor

@ktlim ktlim commented Mar 14, 2018

Bypass function handling was trapping all exceptions, but most of them are actually errors that should be reported.

Bypass function handling was trapping all exceptions, but most of them are actually errors that should be reported.
if hasattr(location.mapper, "bypass_" + location.datasetType):
bypass = self._getBypassFunc(location, dataId)
try:
bypass = bypass()
location.bypass = bypass
except Exception:
except (NoResults, IOError):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be helpful to log something here? "a bypass function exists but no file was found at {location}" ??
I don't know/up to you, I've just been seeing a lot of asks for helpful error messages in recent threads. OTOH it might be noisy in the logs...

@ktlim ktlim merged commit 2e0c876 into master Mar 16, 2018
@ktlim ktlim deleted the tickets/DM-13803 branch August 19, 2018 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants