# error-dialog

> Display an error in a GUI dialog

Latest version **2.0.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-dialog
pnpm add error-dialog
yarn add error-dialog
bun add error-dialog
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-05-03 |
| First published | 2016-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 2 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | error, dialog, exception, prompt, window, box, gui, utility, macos, applescript, osascript |

## Links

- npm: https://www.npmjs.com/package/error-dialog
- Repository: https://github.com/sindresorhus/error-dialog
- Homepage: https://github.com/sindresorhus/error-dialog#readme
- Issues: https://github.com/sindresorhus/error-dialog/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/error-dialog

## Dependencies (2)

- [run-applescript](https://npm.io/package/run-applescript.md) ^5.0.0
- [escape-string-applescript](https://npm.io/package/escape-string-applescript.md) ^3.0.0

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2021-05-03
- 1.0.0 — 2017-01-13
- 0.1.0 — 2016-07-02

## README

# error-dialog

> Display an error in a GUI dialog

<img src="screenshot.png" width="532">

macOS only, but pull request welcome for Linux and Windows support.

## Install

```
$ npm install error-dialog
```

## Usage

```js
import errorDialog from 'error-dialog';

const error = new Error('Expected more unicorns!');

await errorDialog(error, '🦄');
```

## API

### errorDialog(error, windowTitle?)

Returns a `Promise`.

#### error

Type: `Error | string`

An error or error message.

#### windowTitle

Type: `string`

## Related

- [cocoa-dialog](https://github.com/sindresorhus/cocoa-dialog) - Display common GUI dialogs on macOS

---
_Source: https://npm.io/package/error-dialog · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
