We can simplify our code even further by using error-handling
wrappers. For a given base function foo, we define a
wrapper function Foo with identical arguments but
with the first letter of the name capitalized. The wrapper
calls the base function, checks for errors, and terminates if
there are any problems: