mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
script: Add message to NotFoundError (#39394)
Adding an optional message to be attached to a NotFoundError. Testing: Just a refactor Part of #39053 --------- Signed-off-by: Rodion Borovyk <rodion.borovyk@gmail.com>
This commit is contained in:
parent
ffdb7d3663
commit
9713bb9e1b
18 changed files with 37 additions and 38 deletions
|
@ -3181,7 +3181,7 @@ impl ElementMethods<crate::DomTypeHolder> for Element {
|
|||
// https://dom.spec.whatwg.org/#dom-element-removeattributenode
|
||||
fn RemoveAttributeNode(&self, attr: &Attr, can_gc: CanGc) -> Fallible<DomRoot<Attr>> {
|
||||
self.remove_first_matching_attribute(|a| a == attr, can_gc)
|
||||
.ok_or(Error::NotFound)
|
||||
.ok_or(Error::NotFound(None))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-element-hasattribute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue