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 an error that indicates an error that occurred internally in the JavaScript engine. For example: "InternalError: too much recursion".


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


message Optional

Human-readable description of the error.

fileName Optional

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

lineNumber Optional

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