trailsjs/trails

View on GitHub
lib/errors/TrailpackError.js

Summary

Maintainability
A
0 mins
Test Coverage
module.exports = class TrailpackError extends Error {
  constructor (pack, error, stage) {
    pack || (pack = { constructor: { }})
    super(`
      ${pack.name} trailpack failed in the "${stage}" stage.
      ${error}
    `)
  }

  get name () {
    return 'TrailpackError'
  }
}