The InternalError()
constructor creates InternalError objects.
Syntax
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 withoutnew
. Both create a newInternalError
instance.
Parameters
message
- : Human-readable description of the error.
options
- : An object that has the following properties:
cause
- : 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.
- : An object that has the following properties:
fileName
- : The name of the file containing the code that caused the exception
lineNumber
- : The line number of the code that caused the exception
Examples
Creating a new InternalError
new InternalError("Engine failure");
Specifications
Not part of any standard.