Code example for NetworkErrorException

0
				String stationName = WeatherNotificationSettings.getStationName(context);
				Station station = new Station(stationName, stationId, 0, 0, null, true);
				WsKlimaProxy proxy = new WsKlimaProxy();
				weather = proxy.getTemperatureNow(stationId, context);
				if (weather == null)
					throw new NetworkErrorException();
				weather.setStation(station);
			} 
 
		} catch (final NetworkErrorException e) {
			// Add an receiver thats waits on connection 
			addConnectionChangedReceiver(); 
			throw e;
		} 
 
		// Save if data 
		if (weather != null){
			WeatherNotificationSettings.setLastTemperature(context,
					weather.getValue(), weather.getTime());
			return weather;
		} else {