private void produceFault() throws StreamingIOFailure {
      if (shouldThrow) {
        throw new StreamingIOFailure("Simulated fault occurred");
      }
    }
allows testing of "unexpected" errors

@throws StreamingIOFailure
streaming/src/test/org/apache/hive/streaming/TestStreaming.java