36 import jdk.nashorn.internal.runtime.PropertyMap; 37 import jdk.nashorn.internal.runtime.ScriptObject; 38 39 /** 40 * ECMA 15.11.6.6 URIError 41 */ 42 @ScriptClass("Error") 43 public final class NativeURIError extends ScriptObject { 44 45 /** message property in instance */ 46 @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) 47 public Object instMessage; 48 49 /** error name property */ 50 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 51 public Object name; 52 53 /** ECMA 15.1.1.1 message property */ 54 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 55 public Object message; 56 57 // initialized by nasgen 58 private static PropertyMap $nasgenmap$; 59 60 static PropertyMap getInitialMap() { 61 return $nasgenmap$; 62 } 63 64 @SuppressWarnings("LeakingThisInConstructor") 65 NativeURIError(final Object msg, final Global global) { 66 super(global.getURIErrorPrototype(), global.getURIErrorMap()); 67 if (msg != UNDEFINED) { 68 this.instMessage = JSType.toString(msg); 69 } else { 70 this.delete(NativeError.MESSAGE, false); 71 } 72 NativeError.initException(this); 73 } 74 75 private NativeURIError(final Object msg) { | 36 import jdk.nashorn.internal.runtime.PropertyMap; 37 import jdk.nashorn.internal.runtime.ScriptObject; 38 39 /** 40 * ECMA 15.11.6.6 URIError 41 */ 42 @ScriptClass("Error") 43 public final class NativeURIError extends ScriptObject { 44 45 /** message property in instance */ 46 @Property(name = NativeError.MESSAGE, attributes = Attribute.NOT_ENUMERABLE) 47 public Object instMessage; 48 49 /** error name property */ 50 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 51 public Object name; 52 53 /** ECMA 15.1.1.1 message property */ 54 @Property(attributes = Attribute.NOT_ENUMERABLE, where = Where.PROTOTYPE) 55 public Object message; 56 57 /** Nashorn extension: underlying exception */ 58 @Property(attributes = Attribute.NOT_ENUMERABLE) 59 public Object nashornException; 60 61 // initialized by nasgen 62 private static PropertyMap $nasgenmap$; 63 64 static PropertyMap getInitialMap() { 65 return $nasgenmap$; 66 } 67 68 @SuppressWarnings("LeakingThisInConstructor") 69 NativeURIError(final Object msg, final Global global) { 70 super(global.getURIErrorPrototype(), global.getURIErrorMap()); 71 if (msg != UNDEFINED) { 72 this.instMessage = JSType.toString(msg); 73 } else { 74 this.delete(NativeError.MESSAGE, false); 75 } 76 NativeError.initException(this); 77 } 78 79 private NativeURIError(final Object msg) { |