Code example for SQLException

Methods: toString

0
database.openDataBase();
		} 
		catch (SQLException sql)
		{ 
			throw new Error("Unable to execute sql in: " + sql.toString());
		}	 
	} 
     
	/** 
	 * This method populates the timetableLineSpinner with data from the database 
	 */ 
    public void populateLineSpinner() 
    {	 
		ArrayList<String> linesList = database.getBusLines();
		 
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this.getBaseContext(), android.R.layout.simple_spinner_item, linesList);		
		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
		timetableLineSpinner.setAdapter(adapter);	
    }