Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The URIError() constructor creates URIError objects.
Note: URIError() can be called with or without new. Both create a new URIError instance.
Human-readable description of the error.
options OptionalAn object that has the following properties:
cause OptionalA property indicating the specific cause of the error. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.
fileName OptionalThe name of the file containing the code that caused the exception.
lineNumber OptionalThe line number of the code that caused the exception.
| ECMAScript® 2027 Language Specification # sec-nativeerror-constructors |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Oct 30, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.