Closed
Bug 767546
Opened 12 years ago
Closed 12 years ago
WebIDLError should take a list of locations
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
41.97 KB,
patch
|
justin.lebar+bug
:
review+
|
Details | Diff | Splinter Review |
Right now we pass one location directly and the rest in a list. That's kinda hacky; we should just pass a list. Will wait for Peter to land unions before doing this...
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #636387 -
Flags: review?(justin.lebar+bug)
Assignee | ||
Updated•12 years ago
|
Whiteboard: [need review]
Comment 2•12 years ago
|
||
> class WebIDLError(Exception): >- def __init__(self, message, location, warning=False, extraLocations=[]): >+ def __init__(self, message, locations, warning=False): > self.message = message >- self.location = location >+ self.locations = [str(loc) for loc in locations] > self.warning = warning >- self.extraLocations = [str(loc) for loc in extraLocations] Hm, this may have been a good opportunity to use Python's *arg syntax: def __init__(self, message, *locations): There may be a way to shim the warning=False arg into there (although I don't see how that would work), but we could also have WebIDLError and WebIDLWarning as separate classes. OTOH the list is totally clear, and I don't think we have to mess with this further unless you want to. > class BuiltinLocation(object): > def __init__(self, text): >- self.msg = text >+ self.msg = text + "\n" To make sure I understood why you did this: You want BuiltinLocation to have an extra blank line to match Location's _pointerline marker?
Updated•12 years ago
|
Attachment #636387 -
Flags: review?(justin.lebar+bug) → review+
Assignee | ||
Comment 3•12 years ago
|
||
> You want BuiltinLocation to have an extra blank line to match Location's _pointerline
> marker?
Hmm. I added it because stuff was ending up on the same line to my eyes, but yes, looks like that's the main effect.
Assignee | ||
Comment 4•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f44dce601af6
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla16
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f44dce601af6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•