List of usage examples for android.database.sqlite SQLiteConstraintException initCause
public synchronized Throwable initCause(Throwable cause)
From source file:com.appsimobile.appsii.module.home.provider.HomeContentProvider.java
@Override public int delete(Uri uri, String selection, String[] selectionArgs) { SqlArguments args = new SqlArguments(uri, selection, selectionArgs); SQLiteDatabase db = mOpenHelper.getWritableDatabase(); try {//from ww w.jav a 2 s.com int count = db.delete(args.table, args.where, args.args); if (count > 0) sendNotify(uri); return count; } catch (SQLiteConstraintException e) { SQLiteConstraintException ex = new SQLiteConstraintException( "Constraint violation on delete of: " + uri); ex.initCause(e); throw ex; } }