Code example for SQLiteException

        final File dbDir = dbPath.getParentFile();
        if (!dbDir.exists() && !dbDir.mkdirs()) {
            final String msg = "Failed to create database directory at " + dbDir.getAbsolutePath();
            Log.e(TAG, msg);
            throw new SQLiteException(msg);
        return dbPath;
     * Create and/or open a database that will be used for reading and writing. 
     * The first time this is called, the database will be opened and 
     * {@link #onCreate} and if applicable {@link #onUpgrade} will be called. 
     * <p/> 
     * <p>Once opened successfully, the database is cached, so you can 
     * call {@link #getDatabase()} to get access to the database. 
     * (Make sure to call {@link #close} when you no longer need the database.) 
     * Errors such as bad permissions or a full disk may cause this method 
     * to fail, but future attempts may succeed if the problem is fixed.</p> 
     * <p/>