Code example for SQLiteException

Methods: e, getMessage

0
      db.execSQL(CREATE_PLATFORMS);
      db.execSQL(CREATE_PATTERNS);
      db.execSQL(CREATE_PATTERNS_PLATFORMS);
      Log.i(TAG, "Database load complete");
    } catch (SQLiteException e) {
      Log.e(TAG, "Error parsing SQL: " + e.getMessage(), e);
      throw new RuntimeException(e);
    } 
  } 
 
  @Override 
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    if (oldVersion == 1) {
      try { 
        db.execSQL(CREATE_PATTERNS);
        db.execSQL(CREATE_PATTERNS_PLATFORMS);
        Log.i(TAG, "Loaded routes tables");
      } catch (SQLiteException e) {
        Log.e(TAG, "Error parsing SQL: " + e.getMessage(), e);
        throw new RuntimeException(e);
      }