Error handling example