mirror of
https://github.com/servo/servo
synced 2026-04-26 17:45:19 +02:00
script: Finish converting all error message enum variants to Option<String> (#40750)
I used find and replace to finish the job. All this PR does is replace all `Error::<error_name>` occurrences with `Error::<error_name>(None)`. Testing: Refactor Fixes: #39053 Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
@@ -344,7 +344,7 @@ impl CSSStyleDeclaration {
|
||||
) -> ErrorResult {
|
||||
// Step 1. If the readonly flag is set, then throw a NoModificationAllowedError exception.
|
||||
if self.readonly {
|
||||
return Err(Error::NoModificationAllowed);
|
||||
return Err(Error::NoModificationAllowed(None));
|
||||
}
|
||||
|
||||
let id = match id {
|
||||
@@ -529,7 +529,7 @@ impl CSSStyleDeclarationMethods<crate::DomTypeHolder> for CSSStyleDeclaration {
|
||||
fn RemoveProperty(&self, property: DOMString, can_gc: CanGc) -> Fallible<DOMString> {
|
||||
// Step 1
|
||||
if self.readonly {
|
||||
return Err(Error::NoModificationAllowed);
|
||||
return Err(Error::NoModificationAllowed(None));
|
||||
}
|
||||
|
||||
let id = match PropertyId::parse_enabled_for_all_content(&property.str()) {
|
||||
@@ -601,7 +601,7 @@ impl CSSStyleDeclarationMethods<crate::DomTypeHolder> for CSSStyleDeclaration {
|
||||
|
||||
// Step 1
|
||||
if self.readonly {
|
||||
return Err(Error::NoModificationAllowed);
|
||||
return Err(Error::NoModificationAllowed(None));
|
||||
}
|
||||
|
||||
let quirks_mode = window.Document().quirks_mode();
|
||||
|
||||
Reference in New Issue
Block a user