Here’s a basic try-catch block to handle an exception.
Let’s say you’re working on a Linux box and you want to chuck your logs into a file with good ‘ol C++.
Let’s take a common task.
Imagine you’ve got a function that’s doing a bit too much, like this clunky method that initializes an object and also performs logging.