Add an example of error handling, fixes #47