aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domexception.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-06-08 14:48:49 +0200
committerMs2ger <Ms2ger@gmail.com>2016-12-22 16:06:22 +0100
commit1bc0862214b1d025b4c1f5e6348301cacd90cd09 (patch)
treeaf2f7d4143d48b5d3dcba92210f0f2fedd67d24b /components/script/dom/domexception.rs
parent8f2d624cbf2cf0dd73ee2a2a8b50381046b2be7c (diff)
downloadservo-1bc0862214b1d025b4c1f5e6348301cacd90cd09.tar.gz
servo-1bc0862214b1d025b4c1f5e6348301cacd90cd09.zip
Remove and allow some dead code.
Diffstat (limited to 'components/script/dom/domexception.rs')
-rw-r--r--components/script/dom/domexception.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs
index 2a5946193b6..7428a986c48 100644
--- a/components/script/dom/domexception.rs
+++ b/components/script/dom/domexception.rs
@@ -29,13 +29,11 @@ pub enum DOMErrorName {
SecurityError = DOMExceptionConstants::SECURITY_ERR,
NetworkError = DOMExceptionConstants::NETWORK_ERR,
AbortError = DOMExceptionConstants::ABORT_ERR,
- URLMismatchError = DOMExceptionConstants::URL_MISMATCH_ERR,
TypeMismatchError = DOMExceptionConstants::TYPE_MISMATCH_ERR,
QuotaExceededError = DOMExceptionConstants::QUOTA_EXCEEDED_ERR,
TimeoutError = DOMExceptionConstants::TIMEOUT_ERR,
InvalidNodeTypeError = DOMExceptionConstants::INVALID_NODE_TYPE_ERR,
DataCloneError = DOMExceptionConstants::DATA_CLONE_ERR,
- EncodingError,
}
#[dom_struct]
@@ -62,11 +60,7 @@ impl DOMException {
impl DOMExceptionMethods for DOMException {
// https://heycam.github.io/webidl/#dfn-DOMException
fn Code(&self) -> u16 {
- match self.code {
- // https://heycam.github.io/webidl/#dfn-throw
- DOMErrorName::EncodingError => 0,
- code => code as u16,
- }
+ self.code as u16
}
// https://heycam.github.io/webidl/#idl-DOMException-error-names
@@ -93,14 +87,12 @@ impl DOMExceptionMethods for DOMException {
DOMErrorName::SecurityError => "The operation is insecure.",
DOMErrorName::NetworkError => "A network error occurred.",
DOMErrorName::AbortError => "The operation was aborted.",
- DOMErrorName::URLMismatchError => "The given URL does not match another URL.",
DOMErrorName::TypeMismatchError => "The given type does not match any expected type.",
DOMErrorName::QuotaExceededError => "The quota has been exceeded.",
DOMErrorName::TimeoutError => "The operation timed out.",
DOMErrorName::InvalidNodeTypeError =>
"The supplied node is incorrect or has an incorrect ancestor for this operation.",
DOMErrorName::DataCloneError => "The object can not be cloned.",
- DOMErrorName::EncodingError => "The encoding operation (either encoded or decoding) failed."
};
DOMString::from(message)