Standard built-ins

EvalError()

Try the free JavaScript compiler

A historical Error subtype retained for compatibility; modern eval does not generally use it for failures. Creating it does not throw automatically.

Formal Syntax & Structure

javascript syntaxjavascript
new EvalError([message], [options])

Parameters & Attributes

NameTypeDescription
messageStringDiagnostic text.
optionsObjectOptional cause property.

Return Value

EvalError

Error subtype instance.

Working Example

Example Snippetjavascript
console.log(new EvalError("example").name);
JavaScript Reference