docs: static Function getNativeErrorCtor(Context cx, Scriptable scope,
                                         NativeErrors type) {
          // must be called with top level scope
          assert scope.getParentScope() == null;
          if (scope instanceof TopLevel) {
              Function result = ((TopLevel)scope).getNativeErrorCtor(type);
              if (result != null) {
                  return result;
              }
          }
          // fall back to normal constructor lookup
          return ScriptRuntime.getExistingCtor(cx, scope, type.name());
      }