Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 5, 2022
1 parent f2a4365 commit c9936ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/error/modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { allowErrorTypes } from './types.js'
// Custom error `onCreate()` logic can be specified
// - To make it type-specific, an object of functions should be used, then
// `object[error.name]` should be used inside `onCreate()`
// There is no source maps support: instead users can use:
// - Node.js: `--enable-source-maps` flag
// - Chrome: `node-source-map-support`
// - Any browsers: `stacktrace.js`
export const modernErrors = function (errorNames, onCreate) {
const ErrorTypes = Object.fromEntries(
errorNames.map((errorName) => [
Expand Down

0 comments on commit c9936ee

Please sign in to comment.