自定义异常类必须继承于标准异常类exception
自定义异常类必须重写标准异常中的what方法
virtual const char* what()const throw()//防止父类提前抛出异常 { return this->msg.c_str(); }