[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/URIError [Back]  [Original]

URIError - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

URIError

Baseline Widely available *

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 ..

* Some parts of this feature may have varying levels of support.

URIError , URI.

URIError , structuredClone() postMessage().

URIError Error.

In this article

URIError()

URIError.

Error.

URIError.prototype URIError.

URIError.prototype.constructor

-, . URIError URIError.

URIError.prototype.name

. URIError.prototype.name "URIError".

Error.

URIError

js
try {
  decodeURIComponent("%");
} catch (e) {
  console.log(e instanceof URIError); // true
  console.log(e.message); // "malformed URI sequence"
  console.log(e.name); // "URIError"
  console.log(e.stack); //  
}

URIError

js
try {
  throw new URIError("");
} catch (e) {
  console.log(e instanceof URIError); // true
  console.log(e.message); // ""
  console.log(e.name); // "URIError"
  console.log(e.stack); //  
}

Specification
ECMAScript 2027 LanguageSpecification
# sec-native-error-types-used-in-this-standard-urierror


Web Proxy Viewer  |  New URL  |  Original Page