Error handling via throw/catch