title: Is there a way to throw IOException in a runnable?
body: <p>I have some code thats not working(which is a common occurrence for me), but because I am not getting an errors it just continues to run with bad data.  The problem I think is it keeps telling me to wrap parts of my code in try/catch blocks(my tests are basic, I just output a message in the try area and if it gets outputted I assume all went well. All does not seem well in my code). I understand in production, putting a try/catch statement helps the code to continue to run but its making me troubleshooting difficult because I'm trying to troubleshoot that section of my code.</p>
  
  <p>Is there a way around this so I can actually see when something fails within the try area?</p>
  
  <p>Here's a sample of my code:</p>
  
  <pre><code>    try {
          ByteArrayInputStream baos_back = new ByteArrayInputStream(message);
          ObjectInputStream oos_back = new ObjectInputStream(baos_back);
          i = oos_back.readInt();
          d = oos_back.readDouble();
          list_of_ints = (int[]) oos_back.readObject();
          oos_back.reset();
          baos_back.reset();
      } catch (ClassNotFoundException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  </code></pre>