Today, I discovered a few exception specifications in legacy code I've to maintain, when Cppcheck 1.68 ([Inconclusive] but correctly) pointed out that the specified exceptions are not handled in specific portions of the code.[Inconclusive] Unhandled exception specification when calling function [...]. Either use a try/catch around the function call, or add a exception specification for [...] also.But the occurrence of any of them would be catastrophic for the program, so it's a good idea not to handle them locally, and copying the specification over and over the code would be nonsense. And furthermore, exception specifications got deprecated in C++11 (for good reasons). So, generally spoken: Is the best I can do with exception specifications, removing them?
How to deal with historic exception specifications in maintained C++ code
c++;code quality;exception handling;specifications;c++11