Error.constructor

The Error constructor creates an error object.

Syntax

new Error(message?)

Parameters

Examples

throw new Error("test error")
Error: test error