title: Handling exceptions in AsyncTask.doInBackground in an Activity?
body: <p>I am following the <a href="http://developer.android.com/guide/components/processes-and-threads.html" rel="nofollow">guide on Processes and Threads</a> to implement an <code>AsyncTask</code> in an android activity in which I will perform some database access. However, my code has to handle an exception in <code>doInBackground</code>.</p>
  
  <p>My current thinking is to provide a <code>Toast</code> popup to inform the user of this exception, but now I am afraid this too "<em>violates the second rule of the single-threaded model: do not access the Android UI toolkit from outside the UI thread</em>" (as per the guide).</p>
  
  <p>Would I be wrong in providing a Toast popup? Is there a better way to handle exceptions in the <code>doInBackground</code> method?</p>