67 // stack property name 68 static final String STACK = "__stack__"; 69 // lineNumber property name 70 static final String LINENUMBER = "__lineNumber__"; 71 // columnNumber property name 72 static final String COLUMNNUMBER = "__columnNumber__"; 73 // fileName property name 74 static final String FILENAME = "__fileName__"; 75 76 /** Message property name */ 77 @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) 78 public Object instMessage; 79 80 /** ECMA 15.11.4.2 Error.prototype.name */ 81 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 82 public Object name; 83 84 /** ECMA 15.11.4.3 Error.prototype.message */ 85 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 86 public Object message; 87 88 // initialized by nasgen 89 private static PropertyMap $nasgenmap$; 90 91 static PropertyMap getInitialMap() { 92 return $nasgenmap$; 93 } 94 95 @SuppressWarnings("LeakingThisInConstructor") 96 private NativeError(final Object msg, final ScriptObject proto, final PropertyMap map) { 97 super(proto, map); 98 if (msg != UNDEFINED) { 99 this.instMessage = JSType.toString(msg); 100 } else { 101 this.delete(NativeError.MESSAGE, false); 102 } 103 initException(this); 104 } 105 106 NativeError(final Object msg, final Global global) { | 67 // stack property name 68 static final String STACK = "__stack__"; 69 // lineNumber property name 70 static final String LINENUMBER = "__lineNumber__"; 71 // columnNumber property name 72 static final String COLUMNNUMBER = "__columnNumber__"; 73 // fileName property name 74 static final String FILENAME = "__fileName__"; 75 76 /** Message property name */ 77 @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) 78 public Object instMessage; 79 80 /** ECMA 15.11.4.2 Error.prototype.name */ 81 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 82 public Object name; 83 84 /** ECMA 15.11.4.3 Error.prototype.message */ 85 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 86 public Object message; 87 88 /** Nashorn extension: underlying exception */ 89 @Property(attributes = Attribute.NOT_ENUMERABLE) 90 public Object nashornException; 91 92 // initialized by nasgen 93 private static PropertyMap $nasgenmap$; 94 95 static PropertyMap getInitialMap() { 96 return $nasgenmap$; 97 } 98 99 @SuppressWarnings("LeakingThisInConstructor") 100 private NativeError(final Object msg, final ScriptObject proto, final PropertyMap map) { 101 super(proto, map); 102 if (msg != UNDEFINED) { 103 this.instMessage = JSType.toString(msg); 104 } else { 105 this.delete(NativeError.MESSAGE, false); 106 } 107 initException(this); 108 } 109 110 NativeError(final Object msg, final Global global) { |