mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Document error.rs.
This commit is contained in:
parent
2a9acdcb73
commit
ecf0317bc0
1 changed files with 20 additions and 2 deletions
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
//! Utilities to throw exceptions from Rust bindings.
|
//! Utilities to throw exceptions from Rust bindings.
|
||||||
|
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
use dom::bindings::conversions::ToJSValConvertible;
|
use dom::bindings::conversions::ToJSValConvertible;
|
||||||
use dom::bindings::global::GlobalRef;
|
use dom::bindings::global::GlobalRef;
|
||||||
use dom::domexception::DOMException;
|
use dom::domexception::DOMException;
|
||||||
|
@ -21,22 +23,38 @@ use std::ptr;
|
||||||
/// DOM exceptions that can be thrown by a native DOM method.
|
/// DOM exceptions that can be thrown by a native DOM method.
|
||||||
#[deriving(Show, Clone)]
|
#[deriving(Show, Clone)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
|
/// IndexSizeError
|
||||||
IndexSize,
|
IndexSize,
|
||||||
FailureUnknown,
|
/// NotFoundError
|
||||||
NotFound,
|
NotFound,
|
||||||
|
/// HierarchyRequestError
|
||||||
HierarchyRequest,
|
HierarchyRequest,
|
||||||
|
/// InvalidCharacterError
|
||||||
InvalidCharacter,
|
InvalidCharacter,
|
||||||
|
/// NotSupportedError
|
||||||
NotSupported,
|
NotSupported,
|
||||||
|
/// InvalidStateError
|
||||||
InvalidState,
|
InvalidState,
|
||||||
|
/// SyntaxError
|
||||||
Syntax,
|
Syntax,
|
||||||
|
/// NamespaceError
|
||||||
NamespaceError,
|
NamespaceError,
|
||||||
|
/// InvalidAccessError
|
||||||
InvalidAccess,
|
InvalidAccess,
|
||||||
|
/// SecurityError
|
||||||
Security,
|
Security,
|
||||||
|
/// NetworkError
|
||||||
Network,
|
Network,
|
||||||
|
/// AbortError
|
||||||
Abort,
|
Abort,
|
||||||
|
/// TimeoutError
|
||||||
Timeout,
|
Timeout,
|
||||||
|
/// DataCloneError
|
||||||
DataClone,
|
DataClone,
|
||||||
NoModificationAllowedError
|
/// NoModificationAllowedError
|
||||||
|
NoModificationAllowedError,
|
||||||
|
/// Unknown failure
|
||||||
|
FailureUnknown,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The return type for IDL operations that can throw DOM exceptions.
|
/// The return type for IDL operations that can throw DOM exceptions.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue