| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-TW/docs/Web/JavaScript/Reference/Global_Objects/URIError | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since 20157.
* Some parts of this feature may have varying levels of support.
URIError URI
URIError structuredClone() Worker postMessage()
URIError Error
URIError() URIError
URIError.prototype URIError
URIError.prototype.constructor URIError URIError
URIError.prototype.name URIError.prototype.name "URIError"
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); //
}
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 |
This page was last modified on 202589 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |