Preferred coding style for error handling?