Skip to main content

EvalError

Alias to native globalThis.EvalError

The EvalError object indicates an error regarding the global eval() function. This exception is not thrown by JavaScript anymore, however the EvalError object remains for compatibility.

Hierarchy

  • Error
    • EvalError
import { EvalError } from '@w5s/error';

try {
throw new EvalError("Hello");
} catch (e) {
console.log(e instanceof RangeEvalErrorError); // true
console.log(e.message); // "Hello"
console.log(e.name); // "EvalError"
console.log(e.stack); // Stack of the error
}

Index

Constructors

Properties

Constructors

externalconstructor

Properties

name

name: EvalError
Page Options