diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-02-03 18:55:20 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-02-03 18:55:20 -0500 |
commit | 20886ddc46384c008a8b4c9b253f326007adbba6 (patch) | |
tree | cceffa62f07a0c020c888debeebedd03cc8f0a0d /coverage/sqldata.py | |
parent | 69656b0bcc5fe0488e686d7050522cf108db8e7b (diff) | |
download | python-coveragepy-git-20886ddc46384c008a8b4c9b253f326007adbba6.tar.gz |
debug: include an indication of exception in the debug log
Diffstat (limited to 'coverage/sqldata.py')
-rw-r--r-- | coverage/sqldata.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coverage/sqldata.py b/coverage/sqldata.py index 2bec3c96..b3157a8a 100644 --- a/coverage/sqldata.py +++ b/coverage/sqldata.py @@ -516,8 +516,12 @@ class CoverageData(SimpleReprMixin): assert lines or arcs assert not (lines and arcs) if lines and self._has_arcs: + if self._debug.should("dataop"): + self._debug.write("Error: Can't add line measurements to existing branch data") raise DataError("Can't add line measurements to existing branch data") if arcs and self._has_lines: + if self._debug.should("dataop"): + self._debug.write("Error: Can't add branch measurements to existing line data") raise DataError("Can't add branch measurements to existing line data") if not self._has_arcs and not self._has_lines: self._has_lines = lines |