标准异常类型与自定义异常 | C++
本章覆盖:`std::exception`;`std::runtime_error`;`std::logic_error`;`what()`;custom exception;domain error information;exception hierarchy;不需要为每个错误创建复杂继承树;错误信息要包含可定位上下文但避免敏感信息。
本章知识点
std::exceptionstd::runtime_errorstd::logic_errorwhat()- custom exception
- domain error information
- exception hierarchy
- 不需要为每个错误创建复杂继承树
- 错误信息要包含可定位上下文但避免敏感信息