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

Print this page




  44 
  45     /** message property in instance */
  46     @Property(name = NativeError.MESSAGE)
  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     NativeURIError(final Object msg, final Global global) {
  65         super(global.getURIErrorPrototype(), global.getURIErrorMap());
  66         if (msg != UNDEFINED) {
  67             this.instMessage = JSType.toString(msg);
  68         } else {
  69             this.delete(NativeError.MESSAGE, false);
  70         }

  71     }
  72 
  73     private NativeURIError(final Object msg) {
  74         this(msg, Global.instance());
  75     }
  76 
  77     @Override
  78     public String getClassName() {
  79         return "Error";
  80     }
  81 
  82     /**
  83      * ECMA 15.11.6.6 URIError
  84      *
  85      * Constructor
  86      *
  87      * @param newObj was this error instantiated with the new operator
  88      * @param self   self reference
  89      * @param msg    error message
  90      *


  44 
  45     /** message property in instance */
  46     @Property(name = NativeError.MESSAGE)
  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) {
  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      *
  87      * Constructor
  88      *
  89      * @param newObj was this error instantiated with the new operator
  90      * @param self   self reference
  91      * @param msg    error message
  92      *