john-goldsmith/vscode-aws-cloudformation-auto-template-generator

View on GitHub
src/errors/nonexistent-config-file.ts

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%
import BaseError from './base'

/**
 * @param {string} path
 * @param {string} [message]
 */
export default class NonexistentConfigFileError extends BaseError {

  constructor(path: string, message = `No configuration file found at ${path}`) {
    super(message)
    if (Error.captureStackTrace) {
      Error.captureStackTrace(this, NonexistentConfigFileError)
    }
    // this.date = new Date()
    // this.code = ...
    this.name = this.constructor.name
  }

}