title: In what cases does Future.get() throw ExecutionException or InterruptedException
body: <p>My code snippet:</p>
  
  <pre><code>ExecutorService executor = Executors.newSingleThreadExecutor();
  try {
      Task t = new Task(response,inputToPass,pTypes,unit.getInstance(),methodName,unit.getUnitKey());
      Future&lt;SCCallOutResponse&gt; fut = executor.submit(t);
      response = fut.get(unit.getTimeOut(),TimeUnit.MILLISECONDS);
  } catch (TimeoutException e) {
      // if the task is still running, a TimeOutException will occur while fut.get()
      cat.error("Unit " + unit.getUnitKey() + " Timed Out");
      response.setVote(SCCallOutConsts.TIMEOUT);
  } catch (InterruptedException e) {
      cat.error(e);
  } catch (ExecutionException e) {
      cat.error(e);
  } finally {
      executor.shutdown();
  }
  </code></pre>
  
  <p>How should i handle the <code>InterruptedException</code> and <code>ExecutionException</code> in the code? </p>
  
  <p>And in what cases, are these exceptions thrown?</p>