mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
commit
451cf4a3eb
|
@ -8105,13 +8105,13 @@ Lock-free programming rule summary:
|
|||
<a name="S-errors"></a>
|
||||
# E: Error handling
|
||||
|
||||
Error handling involves
|
||||
Error handling involves:
|
||||
|
||||
* Detecting an error
|
||||
* Transmitting information about an error to some handler code
|
||||
* Preserve the state of a program in a valid state
|
||||
* Avoid resource leaks
|
||||
*
|
||||
|
||||
It is not possible to recover from all errors. If recovery from an error is not possible, it is important to quickly "get out" in a well-defined way. A strategy for error handling must be simple, or it becomes a source of even worse errors.
|
||||
|
||||
The rules are designed to help avoid several kinds of errors:
|
||||
|
|
Loading…
Reference in New Issue
Block a user