Наследование от std::exception
От: TimurSPB Интернет  
Дата: 09.10.19 11:56
Оценка:
Clang настоятельно рекомендует наследовать все выбрасываемые исключения от std::exception
https://clang.llvm.org/extra/clang-tidy/checks/hicpp-exception-baseclass.html

документация ссылается на https://www.perforce.com/resources/qac/high-integrity-cpp-coding-standard-exception-handling


Exceptions pass information up the call stack to a point where error handling can be performed. If an object of class type is thrown, the class type itself serves to document the cause of an exception. Only types that inherit from std::exception, should be thrown.


Почему? Какая мотивация?
Make flame.politics Great Again!
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.