summaryrefslogtreecommitdiff
path: root/coverage/sqldata.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-02-03 18:55:20 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-02-03 18:55:20 -0500
commit20886ddc46384c008a8b4c9b253f326007adbba6 (patch)
treecceffa62f07a0c020c888debeebedd03cc8f0a0d /coverage/sqldata.py
parent69656b0bcc5fe0488e686d7050522cf108db8e7b (diff)
downloadpython-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.py4
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