Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: pex_exceptions, utils
-
Labels:
-
Story Points:8
-
Epic Link:
-
Sprint:Measurement-S14-3
-
Team:Data Release Production
Description
I'd like to reimplement our Swig bindings for C++ exceptions to replace the "LsstCppException" class with a more user-friendly mechanism. We'd have a Python exception hierarchy that mirrors the C++ hierarchy (generated automatically with the help of a few Swig macros). These wrapped exceptions could be thrown in Python as if they were pure-Python exceptions, and could be caught in Python in the same language regardless of where they were thrown.
We're doing this as part of a "Measurement" sprint because we'd like to define custom exceptions for different kinds of common measurement errors, and we want to be able to raise those exceptions in either language.
Attachments
Issue Links
- is triggering
-
DM-6305 Remove use of assertRaisesLsstCpp from AFW
- Invalid
FYI, gcov shows that Tracepoint::Tracepoint(void) and Exception::getTraceback() are untested. Also the two Exception::addMessage() cases involving a plain semicolon (one strange, one requiring two addMessage() calls) are not tested.
A Python coverage tool shows that wrappers.ExceptionMeta.__getattr__() is not called. The PyType is None case in translate() isn't called either, but I think that's mostly present for safety.
It's not easy to determine test coverage of .i files, unfortunately.