protected void setupErrorFields(Exception oException) {
   // if hPubErrorOccurred not set by actual driving of Integration
   // Object, then set error fields in output Properties object
   // if it exists, otherwise set them in input Properties object.
   if (this.getHPubErrorOccurred() == 0) {
     if (outputProps != null) {
       outputProps.setHPubErrorOccurred(1);
       outputProps.setHPubErrorException(oException);
       if (oException.getMessage() != null)
         outputProps.setHPubErrorMessage(oException.getMessage());
     } else {
       inputProps.setHPubErrorOccurred(1);
       inputProps.setHPubErrorException(oException);
       if (oException.getMessage() != null)
         inputProps.setHPubErrorMessage(oException.getMessage());
     }
   }
 }