InternalError() constructor

Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The InternalError() constructor creates InternalError objects.


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

InternalError(message, options)
InternalError(message, fileName)
InternalError(message, fileName, lineNumber)

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


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.

fileName Optional Non-standard

The name of the file containing the code that caused the exception

lineNumber Optional Non-standard

The line number of the code that caused the exception


Creating a new InternalError

new InternalError("Engine failure");


Not part of any standard.

Browser compatibility

BCD tables only load in the browser

See also