From 8324b683b4e557e6c5c9d572d01f933b3e074185 Mon Sep 17 00:00:00 2001 From: zsfelfoldi Date: Fri, 20 Mar 2015 13:22:01 +0100 Subject: using robertkrimen/otto, godeps updated --- .../src/github.com/robertkrimen/otto/type_error.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go (limited to 'Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go') diff --git a/Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go b/Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go new file mode 100644 index 000000000..c469f5fcb --- /dev/null +++ b/Godeps/_workspace/src/github.com/robertkrimen/otto/type_error.go @@ -0,0 +1,13 @@ +package otto + +func (rt *_runtime) newErrorObject(name string, message Value) *_object { + self := rt.newClassObject("Error") + if message.IsDefined() { + msg := message.string() + self.defineProperty("message", toValue_string(msg), 0111, false) + self.value = newError(rt, name, msg) + } else { + self.value = newError(rt, name) + } + return self +} -- cgit v1.2.3