Error handling in c tutorial