Code example for JSONException

Methods: toString

0
	                sons.add(son);
	        		//add the son to the list of views active in activity: 
	        		//this.act.addSonLabel(son); 
	            } 
	        }catch(JSONException e){
	            Log.e("log_tag", "Error parsing data "+e.toString());
	        } 
	        filterSons(); 
	        addSonsToLayout(); 
			this.setClickable(false);
		} 
		 
		//remove sons exceding the parameter threshold: 
		protected void filterSons() 
		{ 
			//now we assume sons ordered by likelihood and thus we remove the last ones 
			while (sons.size()>MAX_NUMBER_OF_SONS)
				sons.remove(sons.size()-1);	
		} 
		 
		//spawns sons in the layout avoiding collisions