aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/obscuren/otto/type_error.go
blob: 683fcf929bef66c19e5338cc2e8111c10400c54e (plain) (blame)
1
2
3
4
5
6
7
8
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
}