diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-10-14 14:15:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 14:15:31 -0700 |
commit | 48cbf85add1a9a5c3e583c68c80d16420e606502 (patch) | |
tree | 4bc58cfa365dd100af46b5c60b356a5a3bbcac27 /runtime | |
parent | cb385d9e4acbd81235c3784d7e56b49c3fa41dd3 (diff) |
refactor(ext/url): use concrete error types (#26172)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/errors.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/errors.rs b/runtime/errors.rs index bc28339ad..573563595 100644 --- a/runtime/errors.rs +++ b/runtime/errors.rs @@ -245,6 +245,10 @@ pub fn get_error_class_name(e: &AnyError) -> Option<&'static str> { .map(get_webstorage_class_name) }) .or_else(|| { + e.downcast_ref::<deno_url::UrlPatternError>() + .map(|_| "TypeError") + }) + .or_else(|| { e.downcast_ref::<dlopen2::Error>() .map(get_dlopen_error_class) }) |