Somewhat more reasonable error handling.