Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
标准库中 .Net NotSupportedException 最接近的替代方案是什么?如果我必须创建自己的一个,它应该从逻辑上派生出什么?
标准给你
namespace std { class logic_error; class domain_error; class invalid_argument; class length_error; class out_of_range; class runtime_error; class range_error; class overflow_error; class underflow_error; }
正如 Jerry 所说,runtime_error 是其中的最佳匹配,所以从中派生。