---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# EvalError

The **`EvalError()`** constructor creates a new `EvalError` instance.

## Syntax

```js
new EvalError()
new EvalError(message)
new EvalError(message, options)
new EvalError(message, fileName)
new EvalError(message, fileName, lineNumber)

EvalError()
EvalError(message)
EvalError(message, options)
EvalError(message, fileName)
EvalError(message, fileName, lineNumber)
```

> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.

### Parameters

- `message` _**optional**_
  - : Human-readable description of the error.
- `options` _**optional**_
  - : An object that has the following properties:
    - `cause` _**optional**_
      - : 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.
