Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
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()
InternalError(message)
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 OptionalHuman-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 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
new InternalError("Engine failure");Not part of any standard.