Skip to content

Commit

Permalink
debug: include an indication of exception in the debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Feb 3, 2022
1 parent 69656b0 commit 20886dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coverage/sqldata.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,12 @@ def _choose_lines_or_arcs(self, lines=False, arcs=False):
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
Expand Down

0 comments on commit 20886dd

Please sign in to comment.