edge-error

Create errors custom stack trace pointing to the Edge source file

Usage no npm install needed!

<script type="module">
  import edgeError from 'https://cdn.skypack.dev/edge-error';
</script>

README

Edge error

Create errors custom stack trace pointing to the Edge source file

gh-workflow-image typescript-image npm-image license-image synk-image

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

Usage

Install the package from npm registry as follows

npm i edge-error

# yarn
yarn add edge-error

Then use it as follows

const { EdgeError } = require('edge-error')

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