# edge-error

> Create errors with custom stack trace pointing to the .edge template file

Latest version **4.0.2** (published 2025-01-18) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities; has provenance.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.2 |
| Published | 2025-01-18 |
| First published | 2018-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=18.16.0 |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | Harminder Virk |
| Maintainers | virk, julien-r44 |
| Keywords | edge-error, edge.js |

## Links

- npm: https://www.npmjs.com/package/edge-error
- Repository: https://github.com/edge-js/error
- Homepage: https://github.com/edge-js/error#readme
- Issues: https://github.com/edge-js/error/issues
- npm.io page: https://npm.io/package/edge-error

## 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

- 4.0.2 (latest) — 2025-01-18
- 4.0.0-0 (next) — 2023-07-25
- 4.0.1 — 2024-01-04
- 4.0.0 — 2023-11-06
- 3.0.0 — 2022-09-20
- 2.0.8 — 2022-04-08
- 2.0.7 — 2022-02-27
- 2.0.6 — 2021-09-04
- 2.0.5 — 2021-07-19
- 2.0.4 — 2021-05-15
- 2.0.3 — 2021-05-04
- 2.0.2 — 2021-04-23
- 2.0.1 — 2021-03-23
- 2.0.0 — 2021-02-21
- 1.0.5 — 2020-09-21
- … 5 more at https://npm.io/package/edge-error/versions

## README

# edge-error
> Create errors with custom stack trace pointing to a ".edge" file

[![github-actions-image]][github-actions-url] [![npm-image]][npm-url] [![license-image]][license-url] [![typescript-image]][typescript-url]

The package extends the native Error class and adds support for pushing an error stack frame pointing to a ".edge" template file.

## Usage
Install the package from the npm packages registry.

```bash
npm i edge-error

# yarn
yarn add edge-error
```

Then use it as follows

```js
import { EdgeError } from 'edge-error'

throw new EdgeError('message', 'status', {
  line: 1,
  col: 2,
  filename: 'absolute/path/to/index.edge'
})
```

[github-actions-image]: https://img.shields.io/github/actions/workflow/status/edge-js/error/checks.yml?style=for-the-badge
[github-actions-url]: https://github.com/edge-js/error/actions/workflows/checks.yml "github-actions"

[npm-image]: https://img.shields.io/npm/v/edge-error.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/edge-error "npm"

[license-image]: https://img.shields.io/npm/l/edge-error?color=blueviolet&style=for-the-badge
[license-url]: LICENSE.md "license"

[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
[typescript-url]:  "typescript"

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