Assorted error handling and messaging.