void parseCurrentWeather(JSONObject json) throws WeatherException { try { int code = json.getInt("cod"); if (code != 200) { this.empty = true; return; } parseCityId(json); parseLocation(json); parseTime(json); WeatherParser parser = new CurrentWeatherParser(json); parser.parseCondition(); } catch (JSONException e) { throw new WeatherException("cannot parse the weather", e); } this.empty = false; }