异常库

基本语法:try, catch, throw

标准异常类:

  • std::exception
  • std::runtime_error
  • std::invalid_argument
  • std::out_of_range

自定义异常类继承 std::exception