code: BaseFunction getNativeErrorCtor(NativeErrors type) {
          return errors != null ? errors.get(type) : null;
      }
docs: Get the cached native error constructor from this scope with the
  given <code>type</code>. Returns null if {@link #cacheBuiltins()} has not
  been called on this object.
  @param type the native error type
  @return the native error constructor