diff options
author | nland <nland@dyn.com> | 2016-06-02 18:49:51 -0400 |
---|---|---|
committer | nland <nland@dyn.com> | 2016-06-02 18:49:51 -0400 |
commit | a6b18f23bb76a51882295081152ed557aeabc2a9 (patch) | |
tree | e873e05a388344aa0a4661c82662d13d334c57bf | |
parent | 342b13310e139db280ad1d7a20904383ae1b8f1f (diff) | |
download | python-coveragepy-git-a6b18f23bb76a51882295081152ed557aeabc2a9.tar.gz |
issue #231 on BB: provide more verbose error message
-rw-r--r-- | coverage/python.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coverage/python.py b/coverage/python.py index 8e98bea8..601318c5 100644 --- a/coverage/python.py +++ b/coverage/python.py @@ -51,7 +51,9 @@ def get_python_source(filename): break else: # Couldn't find source. - raise NoSource("No source for code: '%s'." % filename) + exc_msg = "No source for code: '%s'.\n" % (filename,) + exc_msg += "Aborting report output, consider using -i." + raise NoSource(exc_msg) # Replace \f because of http://bugs.python.org/issue19035 source = source.replace(b'\f', b' ') |