mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
refactor: update deno_core for error refactor (#26867)
Closes #26171 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
This commit is contained in:
parent
814da49dff
commit
ea30e188a8
214 changed files with 3787 additions and 4210 deletions
|
@ -126,20 +126,27 @@ deno_core::extension!(deno_web,
|
|||
}
|
||||
);
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
#[derive(Debug, thiserror::Error, deno_error::JsError)]
|
||||
pub enum WebError {
|
||||
#[class("DOMExceptionInvalidCharacterError")]
|
||||
#[error("Failed to decode base64")]
|
||||
Base64Decode,
|
||||
#[class(range)]
|
||||
#[error("The encoding label provided ('{0}') is invalid.")]
|
||||
InvalidEncodingLabel(String),
|
||||
#[class(type)]
|
||||
#[error("buffer exceeds maximum length")]
|
||||
BufferTooLong,
|
||||
#[class(range)]
|
||||
#[error("Value too large to decode")]
|
||||
ValueTooLarge,
|
||||
#[class(range)]
|
||||
#[error("Provided buffer too small")]
|
||||
BufferTooSmall,
|
||||
#[class(type)]
|
||||
#[error("The encoded data is not valid")]
|
||||
DataInvalid,
|
||||
#[class(generic)]
|
||||
#[error(transparent)]
|
||||
DataError(#[from] v8::DataError),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue