Improve the error details when accessing missing resource attributes.

Review Request #10383 — Created Jan. 14, 2019 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

When attempting to access an attribute that doesn't exist on a resource,
the caller would just get a plain AttributeError. Left uncaught, this
would be displayed to the user, making it very hard to report anything
meaningful.

This change adds explicit error information containing the attribute
being requested and the resource it's being requested on.

Used this to diagnose a separate problem. Saw the enhanced error details.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Improve the error details when accessing missing resource attributes.
When attempting to access an attribute that doesn't exist on a resource, the caller would just get a plain `AttributeError`. Left uncaught, this would be displayed to the user, making it very hard to report anything meaningful. This change adds explicit error information containing the attribute being requested and the resource it's being requested on.
f0ab84957fdf4837bbf79e14d223b115d75ecab6 Christian Hammond
rbtools/api/resource.py
Loading...