JavaScript自定义异常

xiaoxiao2021-02-28  107

JavaScript自定义异常

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 /**   * 自定义异常   * @param name 异常名称   * @param message 异常信息   */ function  myException(name ,message) {        this .name = name;        this .message = message;          //this.stack          //this.description          //this.lineNumber }   //调用 throw  new  myException( "我的异常"  , "js代码报错了" );
转载请注明原文地址: https://www.6miu.com/read-24008.html

最新回复(0)