#33205: Move all parsing code out of constructors
-----------------------------+--------------------------------
Reporter: karsten | Owner: karsten
Type: defect | Status: needs_revision
Priority: Medium | Milestone:
Component: Metrics/Library | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points: 2
Reviewer: irl | Sponsor:
-----------------------------+--------------------------------
Changes (by irl):
* status: needs_review => needs_revision
Comment:
It's going to be a lot of boilerplate (unless there is some magic way to
do it) but can we make it easier for users of metrics-lib to have getter
methods parse if not parsed yet?
Alternatively, we should throw an exception if attempting to get a value
from a descriptor that hasn't been parsed yet.
Just returning the default values from the classes isn't really great as
this is going to lead to missing cases where the parse method wasn't
invoked.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33205#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs