smacker: Improve error handling