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:
Ashwin Naren
2025-11-19 22:20:47 -08:00
committed by GitHub
parent 135bc7de36
commit e0eb23ce18
74 changed files with 796 additions and 714 deletions

View File

@@ -511,7 +511,7 @@ impl HTMLCanvasElementMethods<crate::DomTypeHolder> for HTMLCanvasElement {
// Step 1: If this canvas element's bitmap's origin-clean flag is set to false,
// then throw a "SecurityError" DOMException.
if !self.origin_is_clean() {
return Err(Error::Security);
return Err(Error::Security(None));
}
// Step 2: If this canvas element's bitmap has no pixels (i.e. either its
@@ -562,7 +562,7 @@ impl HTMLCanvasElementMethods<crate::DomTypeHolder> for HTMLCanvasElement {
// If this canvas element's bitmap's origin-clean flag is set to false, then throw a
// "SecurityError" DOMException.
if !self.origin_is_clean() {
return Err(Error::Security);
return Err(Error::Security(None));
}
// Step 2. Let result be null.