mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Use TypeError instead of InvalidState for exception.
Addresses Issue #23202
This commit is contained in:
parent
1e158bbfae
commit
15c06b1b26
5 changed files with 10 additions and 29 deletions
|
@ -182,7 +182,12 @@ where
|
|||
DomRoot::downcast(element).ok_or(Error::InvalidState)
|
||||
},
|
||||
// Step 10
|
||||
Some(ConstructionStackEntry::AlreadyConstructedMarker) => Err(Error::InvalidState),
|
||||
Some(ConstructionStackEntry::AlreadyConstructedMarker) => {
|
||||
let s = "Top of construction stack marked AlreadyConstructed due to \
|
||||
a custom element constructor constructing itself after super()"
|
||||
.to_string();
|
||||
Err(Error::Type(s))
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue