aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/obscuren/otto/type_error.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/obscuren/otto/type_error.go')
-rw-r--r--Godeps/_workspace/src/github.com/obscuren/otto/type_error.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/obscuren/otto/type_error.go b/Godeps/_workspace/src/github.com/obscuren/otto/type_error.go
new file mode 100644
index 000000000..683fcf929
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/obscuren/otto/type_error.go
@@ -0,0 +1,9 @@
+package otto
+
+func (runtime *_runtime) newErrorObject(message Value) *_object {
+ self := runtime.newClassObject("Error")
+ if message.IsDefined() {
+ self.defineProperty("message", toValue_string(toString(message)), 0111, false)
+ }
+ return self
+}