Beautifully designed error handler