Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle coverage file not found error separately #10

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

Merged
merged 1 commit into from
Apr 20, 2016

Conversation

dblandin
Copy link
Contributor

This commit introduces handling for a file not found error separate from the
more generic CoverageException from coverage.py.

This commit introduces handling for a file not found error separate from the
more generic `CoverageException` from coverage.py.
@@ -8,6 +8,10 @@
from ..components.payload_validator import PayloadValidator


class CoverageFileNotFound(Exception):
pass
Copy link

Choose a reason for hiding this comment

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

What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're not allowed to have an empty class definition in Python so this creates a simple subclass of Exception. This seemed like the idiomatic way of defining a custom exception without any special behavior.

Copy link

Choose a reason for hiding this comment

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

Cool thanks!

@gdiggs
Copy link

gdiggs commented Apr 20, 2016

LGTM

@dblandin dblandin merged commit ca8d010 into master Apr 20, 2016
@dblandin dblandin deleted the devon/handle-file-not-found-error branch April 20, 2016 19:39
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.

2 participants