filmov
tv
CppCon 2019: Andrzej Krzemieński “Error Handling is Cancelling Operations”
![preview_player](https://i.ytimg.com/vi/zte8IxkHqc4/maxresdefault.jpg)
Показать описание
—
—
—
When we first learn how to write programs, especially how to handle errors, we are given lots of advice saying do this, don't do that. Sometimes with rationale and sometimes not; but it is often difficult to make mental model that would make it easy to understand why we are doing it this way and not another, and why we have to follow this and this rule.
In this talk I will share an important observation: error handling -- be it error codes, errno, exceptions, error monad -- is about cancelling dependent operations. If we understand this, lots of recommended practices immediately start to make sense and become intuitive.
—
Andrzej Krzemieński
Sabre Polska
Software developer
Kraków, Poland
—
*-----*
*-----*
—
—
When we first learn how to write programs, especially how to handle errors, we are given lots of advice saying do this, don't do that. Sometimes with rationale and sometimes not; but it is often difficult to make mental model that would make it easy to understand why we are doing it this way and not another, and why we have to follow this and this rule.
In this talk I will share an important observation: error handling -- be it error codes, errno, exceptions, error monad -- is about cancelling dependent operations. If we understand this, lots of recommended practices immediately start to make sense and become intuitive.
—
Andrzej Krzemieński
Sabre Polska
Software developer
Kraków, Poland
—
*-----*
*-----*