Closed
Bug 767546
Opened 13 years ago
Closed 13 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•13 years ago
|
||
Attachment #636387 -
Flags: review?(justin.lebar+bug)
![]() |
Assignee | |
Updated•13 years ago
|
Whiteboard: [need review]
Comment 2•13 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•13 years ago
|
Attachment #636387 -
Flags: review?(justin.lebar+bug) → review+
![]() |
Assignee | |
Comment 3•13 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•13 years ago
|
||
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla16
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•