summaryrefslogtreecommitdiff
path: root/src/util/expected.hpp
Commit message (Collapse)AuthorAgeFilesLines
* enhance: Add util::throw_on_error functionsJoel Rosdahl2022-09-211-1/+28
|
* enhance: Add prefix parameter to util::value_or_throwJoel Rosdahl2022-09-211-1/+32
|
* refactor: Improve handling of statistics updates and expected eventsJoel Rosdahl2021-08-081-0/+8
| | | | | | | | | | | | | | | Ccache uses exceptions for both truly exceptional events (such as I/O error) and non-exceptional events (such as unsupported compiler arguments). Regardless of the nature of the event, at most one statistics counter can be incremented. Improve this by: - Using nonstd::expected instead of exceptions internally in the main code flow. This makes the code easier to reason about. - Adding support for communicating several statistics counter updates both for success and failure code paths. This is in preparation for future improvements of statistics related to secondary storage.
* Remove redundant _utils suffix for util headersJoel Rosdahl2021-07-191-0/+58