define some commonly used exceptions
npm install kinyx-base-exceptions
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,抛出该异常。');