coveragepy icon indicating copy to clipboard operation
coveragepy copied to clipboard

Report data file errors in more detail

Open bartfeenstra opened this issue 9 months ago • 1 comments

This PR fixes https://github.com/nedbat/coveragepy/issues/1781

Changes

  • Introduce NoDataError subclasses for specific purposes
    • Factory methods to construct helpful messages, because it keeps all the default behavior around assumptions of exceptions just having a single string argument working (it gets funky when pickling and what not, so I tend to take this approach)
  • When possible, suggest that the user runs the combine command
  • All critical (albeit sometimes seemingly trivial) bits are now centralized, e.g. no more duplication of messages. This makes it easier to keep everything in sync and improve on.

bartfeenstra avatar May 13 '24 16:05 bartfeenstra