title: Close an application If run time exception occurs using Robotium
body: <p>I have a testcase like I want to crash the application at run time. As user clicks on upload button, activity starts uploading/fetching  the data to USB pendrive that's attached to my android tablet. So </p>
  
  <p><strong>once the upload operation starts,the application should get closed automatically if run time exception occurs.</strong></p>
  
  <p>How can we write a testcase for this using Robotium?</p>
  
  <p>Help and sugesstions are always appreciated,</p>
  
  <p>Thanks</p>
  
  <p>Here is my sample code.</p>
  
  <pre><code>   solo.clickOnMenuItem("Upload");
     solo.sleep(1000); 
     solo.assertCurrentActivity("some message", SomeActivity.class);
  </code></pre>