aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/domexception.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-09-16 07:10:48 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-09-24 11:58:28 +0530
commit982e55ac1c157aa0484a34d8cb33c12b7bb7eef3 (patch)
treeee7f90cb3dd0306336b030b4a7fd693c60e79501 /components/script/dom/domexception.rs
parentb677f0f4ae718c9c6953134bbed27656a6aeb48d (diff)
downloadservo-982e55ac1c157aa0484a34d8cb33c12b7bb7eef3.tar.gz
servo-982e55ac1c157aa0484a34d8cb33c12b7bb7eef3.zip
Add better stringifier for DOMException
Diffstat (limited to 'components/script/dom/domexception.rs')
-rw-r--r--components/script/dom/domexception.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs
index 19751284bcf..e63cbedafbc 100644
--- a/components/script/dom/domexception.rs
+++ b/components/script/dom/domexception.rs
@@ -104,4 +104,9 @@ impl DOMExceptionMethods for DOMException {
message.to_owned()
}
+
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-error.prototype.tostring
+ fn Stringifier(&self) -> String {
+ format!("{}: {}", self.Name(), self.Message())
+ }
}