custom-error-class

WebJar for custom-error-class

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

custom-error-class
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

custom-error-class
WebJar for custom-error-class
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/mafintosh/custom-error-class

Скачать custom-error-class

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/custom-error-class/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>custom-error-class</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/custom-error-class/
implementation 'org.webjars.npm:custom-error-class:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/custom-error-class/
implementation ("org.webjars.npm:custom-error-class:1.0.0")
'org.webjars.npm:custom-error-class:jar:1.0.0'
<dependency org="org.webjars.npm" name="custom-error-class" rev="1.0.0">
  <artifact name="custom-error-class" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='custom-error-class', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "custom-error-class" % "1.0.0"
[org.webjars.npm/custom-error-class "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

custom-error-class

Straightforward ES6 class you can extend to make custom errors that are all instanceof Error with proper stacks.

npm install custom-error-class

Usage

const CustomError = require('custom-error-class')

class MyError extends CustomError {
  constructor () {
    super('an error happened')
    this.code = 'SOME_CODE'
  }
}

// Use this error as you normally would.
throw new MyError()

Credits to @pfrazee who wrote most of it.

License

MIT

Версии библиотеки

Версия
1.0.0