pub(crate) enum Error {
Show 33 variants
IndexSize(Option<String>),
NotFound(Option<String>),
HierarchyRequest(Option<String>),
WrongDocument(Option<String>),
InvalidCharacter(Option<String>),
NotSupported(Option<String>),
InUseAttribute(Option<String>),
InvalidState(Option<String>),
Syntax(Option<String>),
Namespace(Option<String>),
InvalidAccess(Option<String>),
Security(Option<String>),
Network(Option<String>),
Abort(Option<String>),
Timeout(Option<String>),
InvalidNodeType(Option<String>),
DataClone(Option<String>),
TransactionInactive(Option<String>),
ReadOnly(Option<String>),
Version(Option<String>),
NoModificationAllowed(Option<String>),
QuotaExceeded {
quota: Option<Finite<f64>>,
requested: Option<Finite<f64>>,
},
TypeMismatch(Option<String>),
InvalidModification(Option<String>),
NotReadable(Option<String>),
Data(Option<String>),
Operation(Option<String>),
NotAllowed(Option<String>),
Encoding(Option<String>),
Constraint(Option<String>),
Type(String),
Range(String),
JSFailed,
}Expand description
DOM exceptions that can be thrown by a native DOM method. https://webidl.spec.whatwg.org/#dfn-error-names-table
Variants§
IndexSize(Option<String>)
IndexSizeError DOMException
NotFound(Option<String>)
NotFoundError DOMException
HierarchyRequest(Option<String>)
HierarchyRequestError DOMException
WrongDocument(Option<String>)
WrongDocumentError DOMException
InvalidCharacter(Option<String>)
InvalidCharacterError DOMException
NotSupported(Option<String>)
NotSupportedError DOMException
InUseAttribute(Option<String>)
InUseAttributeError DOMException
InvalidState(Option<String>)
InvalidStateError DOMException
Syntax(Option<String>)
SyntaxError DOMException
Namespace(Option<String>)
NamespaceError DOMException
InvalidAccess(Option<String>)
InvalidAccessError DOMException
Security(Option<String>)
SecurityError DOMException
Network(Option<String>)
NetworkError DOMException
Abort(Option<String>)
AbortError DOMException
Timeout(Option<String>)
TimeoutError DOMException
InvalidNodeType(Option<String>)
InvalidNodeTypeError DOMException
DataClone(Option<String>)
DataCloneError DOMException
TransactionInactive(Option<String>)
TransactionInactiveError DOMException
ReadOnly(Option<String>)
ReadOnlyError DOMException
Version(Option<String>)
VersionError DOMException
NoModificationAllowed(Option<String>)
NoModificationAllowedError DOMException
QuotaExceeded
QuotaExceededError DOMException
TypeMismatch(Option<String>)
TypeMismatchError DOMException
InvalidModification(Option<String>)
InvalidModificationError DOMException
NotReadable(Option<String>)
NotReadableError DOMException
Data(Option<String>)
DataError DOMException
Operation(Option<String>)
OperationError DOMException
NotAllowed(Option<String>)
NotAllowedError DOMException
Encoding(Option<String>)
EncodingError DOMException
Constraint(Option<String>)
ConstraintError DOMException
Type(String)
TypeError JavaScript Error
Range(String)
RangeError JavaScript Error
JSFailed
A JavaScript exception is already pending.
Trait Implementations§
Source§impl ErrorToJsval for Error
impl ErrorToJsval for Error
Source§fn to_jsval(
self,
cx: SafeJSContext,
global: &GlobalScope,
rval: MutableHandleValue<'_>,
can_gc: CanGc,
)
fn to_jsval( self, cx: SafeJSContext, global: &GlobalScope, rval: MutableHandleValue<'_>, can_gc: CanGc, )
Convert this error value to a JS value, consuming it in the process.
Source§impl MallocSizeOf for Error
impl MallocSizeOf for Error
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more