mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-03 23:36:21 +02:00
1.6 KiB
1.6 KiB
Edge error
Create errors custom stack trace pointing to the Edge source file
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'
})
