| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/URIError | [Back] [Original] |
Get to know MDN better
Esta pgina ha sido traducida del ingls por la comunidad. Aprende ms y nete a la comunidad de MDN Web Docs.
This feature is well established and works across many devices and browser versions. Its been available across browsers since julio de 2015.
* Some parts of this feature may have varying levels of support.
El objeto URIError representa un error cuando una funcin de manejo de URI
global se us de manera incorrecta.
URIError()Crea un nuevo objeto URIError.
URIError.prototype.messageMensaje de error.
URIError.prototype.nameNombre de error. Heredado de Error.
URIError.prototype.fileNameRuta al archivo que provoc este error. Heredado de Error.
URIError.prototype.lineNumberNmero de lnea en el archivo que provoc este error. Heredado de
Error.
URIError.prototype.columnNumberNmero de columna en la lnea que provoc este error. Heredado de
Error.
URIError.prototype.stackRastro de pila. Heredado de Error.
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.fileName); // "Scratchpad/1"
console.log(e.lineNumber); // 2
console.log(e.columnNumber); // 2
console.log(e.stack); // "@Scratchpad/2:2:3\n"
}
try {
throw new URIError("Hello", "someFile.js", 10);
} catch (e) {
console.log(e instanceof URIError); // true
console.log(e.message); // "Hello"
console.log(e.name); // "URIError"
console.log(e.fileName); // "someFile.js"
console.log(e.lineNumber); // 10
console.log(e.columnNumber); // 0
console.log(e.stack); // "@Scratchpad/2:2:9\n"
}
| Specification |
|---|
| ECMAScript 2027 LanguageSpecification # sec-native-error-types-used-in-this-standard-urierror |
This page was last modified on 29 may 2026 by MDN contributors.
URIErrorErrorObject/FunctionAggregateErrorEvalErrorInternalErrorRangeErrorReferenceErrorSyntaxErrorTypeErrorYour 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 |