kinyx-base-exceptions

1.0.0 • Public • Published

exceptions

define some commonly used exceptions

Install

npm install kinyx-base-exceptions

Usage

import { IllegalArgumentException } from 'kinyx-base-exceptions';
throw new IllegalArgumentException('主要用于参数校验,参数个数或参数类型不符合预期时,抛出该异常。');
import { NotImplementedException } from 'kinyx-base-exceptions';
throw new NotImplementedException('主要用于某个功能在未来可能会增加实现,但目前没有实现,抛出该异常。');
import { NeverHappensException } from 'kinyx-base-exceptions';
throw new NeverHappensException('用于永远不应该被执行到的代码,一旦被执行了,则说明一定是bug,抛出该异常。');

Readme

Keywords

Package Sidebar

Install

npm i kinyx-base-exceptions

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.46 kB

Total Files

8

Last publish

Collaborators

  • kinyx