Generic and global error handling.