Opened 6 months ago

Closed 2 months ago

#5480 closed enhancement (complete)

recode user context utils without exceptions

Reported by: fdupont Owned by: fdupont
Priority: low Milestone: Kea1.4
Component: configuration Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Subtickets

Change History (7)

comment:1 Changed 6 months ago by fdupont

  • Owner set to fdupont
  • Status changed from new to accepted

comment:2 Changed 6 months ago by fdupont

Really to consume time waiting for something to compile or pass database tests...

comment:3 Changed 6 months ago by fdupont

  • Owner changed from fdupont to UnAssigned
  • Status changed from accepted to reviewing

Done Ready for review.

comment:4 Changed 3 months ago by tmark

  • Owner changed from UnAssigned to tmark

comment:5 follow-up: Changed 3 months ago by tmark

  • Owner changed from tmark to fdupont

The changes seem ok, they do indeed remove exceptions from positive flow of code which is proper.

I think you should add some discussion of what moveComments() and extractComments() do in their respective commentaries in user_context_utils.h. It isn't entirely clear, without reading the code itself what these will actually do. Using a parameter with an entirely generic name like "element" isn't helpful either, calling it something "source" would help. Especially within the code itself.

comment:6 in reply to: ↑ 5 Changed 2 months ago by fdupont

Replying to tmark:

The changes seem ok, they do indeed remove exceptions from positive flow of code which is proper.

=> the idea that exceptions are only for exceptional conditions is for me an absurd but common misconception...

I think you should add some discussion of what moveComments() and extractComments() do in their respective commentaries in user_context_utils.h. It isn't entirely clear, without reading the code itself what these will actually do. Using a parameter with an entirely generic name like "element" isn't helpful either, calling it something "source" would help. Especially within the code itself.

=> source is misleading as the common case is to do nothing (more to return the argument so it can be shared)...

I am merging and updating comments.

comment:7 Changed 2 months ago by fdupont

  • Resolution set to complete
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.