Mastering Error Handling in Functions Why I Throw Exceptions

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

And, if you don't like the idea of engaging exception handling for some reason, the alternative is to change the contract. Instead of Process::write, it's Process::try_write. If it can't write, that's not a contract violation, it's a return value of `false`.

logiclrd