]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/leaf/example/print_file/readme.md
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / leaf / example / print_file / readme.md
1 # Print File Example
2
3 This directory has three versions of the same simple program, which reads a
4 file, prints it to standard out and handles errors using LEAF, each using a
5 different variation on error handling:
6
7 * [print_file_result.cpp](./print_file_result.cpp) reports errors with
8 `leaf::result<T>`, using an error code `enum` for classification of failures.
9
10 * [print_file_outcome_result.cpp](./print_file_outcome_result.cpp) is the same
11 as the above, but using `outcome::result<T>`. This demonstrates the ability
12 to transport arbitrary error objects through APIs that do not use
13 `leaf::result<T>`.
14
15 * [print_file_eh.cpp](./print_file_eh.cpp) throws on error, using an error code
16 `enum` for classification of failures.