diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-10-17 12:05:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 19:05:38 +0000 |
commit | eca83fc9b45ab1e5a73bd7b13b05ee42ab1a4dcc (patch) | |
tree | ac032ce2c861bbbdbb31fa829be4d53b34be00f1 /ext/crypto | |
parent | 40b4b9aaa318dcbd1e639542b7cb18df6d96db68 (diff) |
refactor(ext/web): use concrete error types (#26185)
Diffstat (limited to 'ext/crypto')
-rw-r--r-- | ext/crypto/lib.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs index c96029bf4..b5bafc580 100644 --- a/ext/crypto/lib.rs +++ b/ext/crypto/lib.rs @@ -149,10 +149,7 @@ pub fn op_crypto_get_random_values( #[buffer] out: &mut [u8], ) -> Result<(), AnyError> { if out.len() > 65536 { - return Err( - deno_web::DomExceptionQuotaExceededError::new(&format!("The ArrayBufferView's byte length ({}) exceeds the number of bytes of entropy available via this API (65536)", out.len())) - .into(), - ); + return Err(custom_error("DOMExceptionQuotaExceededError", format!("The ArrayBufferView's byte length ({}) exceeds the number of bytes of entropy available via this API (65536)", out.len()))); } let maybe_seeded_rng = state.try_borrow_mut::<StdRng>(); |