Opened 12 years ago

Closed 11 years ago

#201 closed enhancement (fixed)

make Violation messages for arguments and answers include the method name

Reported by: davidsarah Owned by: davidsarah
Priority: major Milestone: 0.6.5
Component: error-handling Version: 0.6.4
Keywords: usability error-reporting review-needed Cc:

Description

For example:

foolscap.tokens.Violation: Violation (<RootSlicer>.<answer-1>): ('cannot serialize <StorageServer ncieuno4> (allmydata.storage.server.StorageServer)',)

does not mention the method name. The linked pull request will change it to:

foolscap.tokens.Violation: Violation (<RootSlicer>.<answer-1-to-getReferenceByName>): ('cannot serialize <StorageServer ncieuno4> (allmydata.storage.server.StorageServer)',)

i.e. mentioning that the answer that failed to serialize was to the method getReferenceByName.

Arguments are handled similarly.

Change History (5)

comment:2 Changed 12 years ago by davidsarah

Keywords: review-needed added
Owner: changed from davidsarah to Brian Warner

comment:3 Changed 12 years ago by Brian Warner

Huh, I didn't realize that was broken. Method names were meant to be included in the parent slicers (the CallSlicer for the request arguments). I see where AnswerSlicer is missing information.. that part of the patch looks great. Can you confirm that errors in the request arguments don't mention their methodname as part of the parent CallSlicer.describe string? If it's working the way I expected it to, the description should look something like:

<RootSlicer>.<call-REQID-CLID-METHODNAME>.<ARGNUMORNAME>

I'm happy to apply both patches though, even if the extra METHODNAME turns out to be redundant.

comment:4 Changed 11 years ago by davidsarah

Owner: changed from Brian Warner to davidsarah
Status: newassigned

I missed this question, will look at it when I have time.

comment:5 Changed 11 years ago by Brian Warner

Milestone: undecided0.6.5
Resolution: fixed
Status: assignedclosed

Landed in [3aaa370], would still be nice to get specific tests for it eventually.

Note: See TracTickets for help on using tickets.