title: Can't Catch NetworkOnMainThreadException
body: <p>I know what causes a NetworkOnMainThreadException, as well as how to fix it, but for the purposes of improving the development experience, I'd like to be able to catch the exception and at least log the event or alert the user (who is still the developer at this point)...</p>
  
  <p>Strangely, I'm not having any luck with this code (which sends and receives over my TCP socket):</p>
  
  <pre><code>try
  {
      toServer.println (msg.trim());
      resp = fromServer.readLine();
  }
  catch (android.os.NetworkOnMainThreadException nex)
  { ... do something here ... }
  </code></pre>
  
  <p>Eclipse doesn't recognize that exception at all, and I copy-pasta-ed the exception type from the Android Developer website -- I'm pretty sure I spelled it right...</p>
  
  <p>Is there something I don't know about Java (perhaps) that makes this exception uncatchable??</p>
  
  <p>Thanks,
  R.</p>