Error handling: return in error case