Skip to main content
Version: 2.3.0

URIError

The URIError() constructor creates an error when a global URI handling function was used in a wrong way.

Syntax

new URIError()
new URIError(message)
new URIError(message, options)
new URIError(message, fileName)
new URIError(message, fileName, lineNumber)

URIError()
URIError(message)
URIError(message, options)
URIError(message, fileName)
URIError(message, fileName, lineNumber)

Note: URIError() can be called with or without new. Both create a new URIError instance.

Parameters

  • message optional
    • : Human-readable description of the error.
  • options optional
    • : An object that has the following properties:
      • cause optional
        • : A 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.