John McFarlane, 2021
This project contains a toy program written in C++ which demonstrates an error-handling strategy recommended for robust applications. It takes a number and prints the corresponding letter of the alphabet.
Most of the comments in the source code are written to explain the error-handling and bug handling choices made.
The program uses some C++20 features and has only been tested with Clang 11 on Ubuntu 20.04.
- Clang-11
- CMake 3.16
- fmt 7.1.3
The build script uses the Conan package manager to install the fmt library.
After cloning the repository and changing to the project root folder,
-
Create a build directory e.g. build:
mkdir build && cd build
-
Build the project using the script provided:
../test/scripts/build-clang.sh
-
Run the approval tests:
ctest
-
Study the code to understand the error-handling strategy proposed.
-
Send questions, feedback and bug reports to the author via the GitHub issues page.