rudimentary error handling in dream