How should exceptions be used in modern C ++?

Currently, we are throwing only on a fatal failure that occurs due to an external source (for example, data) and each time we try to catch the whole process.

When / Why / How should I use exceptions in modern C ++?

Does C ++ 11 change the answer to the above question?

+5
source share
1 answer

As for the first part of the question (best practice), the standard link is “Exception-Security and Technology”, part “Exceptional C ++: 47 puzzles, programming problems and solutions” by Herb Sutter.

Addressing part of C ++ 11 - the following links may be useful:

, :

http://www2.research.att.com/~bs/C++0xFAQ.html#rethrow

http://www2.research.att.com/~bs/C++0xFAQ.html#noexcept

, , : " unique_ptr [...]" http://www2.research.att.com/~bs/C++0xFAQ.html#std-unique_ptr

: http://herbsutter.com/2010/03/13/trip-report-march-2010-iso-c-standards-meeting/

+2

All Articles