title: Intercept DB error "file is encrypted or is not a database"
body: <p>Because of I am trying to implement import/export data I want to test what happen if the imported file is not a sqlite database to manage the error.</p>
  
  <p>In logcat I have the following:</p>
  
  <pre><code>03-22 15:02:39.957: E/SQLiteLog(20407): (26) file is encrypted or is not a database
  03-22 15:02:39.978: E/DefaultDatabaseErrorHandler(20407): Corruption reported by sqlite on database: /data/data/com.crbin1.ltd/databases/dbltd
  03-22 15:02:40.017: E/DefaultDatabaseErrorHandler(20407): deleting the database file: /data/data/com.crbin1.ltd/databases/dbltd
  </code></pre>
  
  <p>The application simply create a new empty db without error for user.</p>
  
  <p>After db import I call the following code (DatabaseLTD is my SQliteOpenHelper class)</p>
  
  <pre><code>private void checkImportedDb() {
      try {
          DatabaseLTD dbltd = new DatabaseLTD(mCtx);
          SQLiteDatabase db = dbltd.getReadableDatabase();
      } catch (SQLiteException e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>But I am not able to intercept the "file is encrypted or is not a database" error. How can I catch the error to manage it?</p>