sophisticated error handling (with a monocle)