ch 8 - error handling