Context manager to catch and display exceptions

Sometimes we know there might be an exception - when printing, for
example - and we just want to display it to the user when it happens.
Add a context manager to enable this, to be used as follows:

with ui.exception_guard("doing something that might fail",
                        title="Something bad happened):
    do_something_that_might_fail()
Add exception guard to some calls to the printer