diff --git a/coverage/sqldata.py b/coverage/sqldata.py index 2bec3c96f..b3157a8a7 100644 --- a/coverage/sqldata.py +++ b/coverage/sqldata.py @@ -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