title: unhandled exception type error
body: <p>I have never gotten this error before so I am not sure what to do or what it means</p>
  
  <blockquote>
    <p>Unhandled exception type <code>OperationApplicationException</code></p>
  </blockquote>
  
  <p>It occurs in this code:</p>
  
  <pre><code>public void putSettings(SharedPreferences pref){
      ArrayList&lt;ContentProviderOperation&gt; ops =
            new ArrayList&lt;ContentProviderOperation&gt;();
  
      ops.add(ContentProviderOperation.newUpdate(Data.CONTENT_URI)
      .withSelection(Data.RAW_CONTACT_ID + "=?", new String[]{String.valueOf(pref.getString(SmsPrefs.ID, ""))})
      .withValue(Data.MIMETYPE,"vnd.android.cursor.item/color")
      .withValue("data1",nColor).build());
      getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops); //error
  
  
      ops.add(ContentProviderOperation.newUpdate(Data.CONTENT_URI)
      .withSelection(Data.RAW_CONTACT_ID + "=?", new String[]{String.valueOf(pref.getString(SmsPrefs.ID, ""))})
      .withValue(Data.MIMETYPE,"vnd.android.cursor.item/vibrate")
      .withValue("data1", nVibrate).build());
      getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops); //error
  
      ops.add(ContentProviderOperation.newUpdate(Data.CONTENT_URI)
      .withSelection(Data.RAW_CONTACT_ID + "=?", new String[]{String.valueOf(pref.getString(SmsPrefs.ID, ""))})
      .withValue(Data.MIMETYPE, "vnd.android.cursor.item/sound")
      .withValue("data1", ringTonePath).build());
      getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);//error
  }
  </code></pre>
  
  <p>It gives me 2 options "add throws declaration" and "surround with try/catch".</p>
  
  <p>What do I have to do and why?</p>