# Source: https://github.com/quick-lint/quick-lint-js/blob/master/docs/errors/E0119.md

# E0119: missing body for catch clause

```config-for-examples
{
  "globals": {
    "parseConfig": true
  }
}
```

`catch` clauses in `try` statements require a body, which must be a list of
statements surrounded by `{` and `}`. It is a syntax error to omit the body of a
`catch` clause:

```javascript
const fs = require("fs");

async function readConfig(configFilePath) {
  try {
    let data = await fs.promises.readFile(
      configFilePath,
      "utf-8",
    );
    return parseConfig(data);
  } catch (error)
}
```

To fix this error, write the body of the `catch` statement, including `{` and
`}`:

```javascript
const fs = require("fs");

async function readConfig(configFilePath) {
  try {
    let data = await fs.promises.readFile(
      configFilePath,
      "utf-8",
    );
    return parseConfig(data);
  } catch (error) {
    if (error.code === 'ENOENT') {
      return {};
    } else {
      throw error;
    }
  }
}
```

Introduced in quick-lint-js version 0.2.0.