Code example for JSONException

Methods: getLocalizedMessage

0
			JSONObject jsonObject = new JSONObject();
			try { 
				currentData.put(directory, jsonObject);
				currentData = jsonObject;
			} catch (JSONException e1) {
				Log.e(TAG, e.getLocalizedMessage());			
			} 
		} 
	} 
		 
	/** 
	 * Sets the value for the given key within the current directory/level. 
	 *  
	 * @param key the key 
	 * @param value the values 
	 */ 
	public void setValue(String key, String value) {
		try { 
			currentData.put(key, value);
		} catch (JSONException e) {
			Log.e(TAG, e.getLocalizedMessage());