src/jdk/nashorn/internal/objects/NativeURIError.java

Print this page




  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(), getInitialMap());
  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) {
  80         this(msg, Global.instance());
  81     }
  82 
  83     @Override
  84     public String getClassName() {
  85         return "Error";
  86     }
  87 
  88     /**
  89      * ECMA 15.11.6.6 URIError
  90      *


  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     @SuppressWarnings("LeakingThisInConstructor")
  65     NativeURIError(final Object msg, final Global global) {
  66         super(global.getURIErrorPrototype(), $nasgenmap$);
  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) {
  76         this(msg, Global.instance());
  77     }
  78 
  79     @Override
  80     public String getClassName() {
  81         return "Error";
  82     }
  83 
  84     /**
  85      * ECMA 15.11.6.6 URIError
  86      *