code: protected void handleAdapterInvocationError(Throwable errorCause)
          throws ActivityException {
          logger.severeException(getAdapterInvocationErrorMessage(), errorCause);
          boolean isErrorRetryable;
          int errorCode;
          if (errorCause instanceof AdapterException) {
              AdapterException adEx = (AdapterException) errorCause;
              isErrorRetryable = adEx.isRetryable();
              if (adEx.getCode() != 0) {
                  errorCode = adEx.getCode();
              }
              else {
                  errorCode = ServiceException.INTERNAL_ERROR;
              }
          }
          else if (errorCause instanceof ConnectionException) {
              errorCode = ((ConnectionException)errorCause).getCode();
              // if process is invoked sync style, no need to retry due to connection failure
              Process procVO = getProcessDefinition();
              if (procVO.getProcessType().equals(ProcessVisibilityConstant.SERVICE)) {
                  super.setReturnCode("ERROR:");
                  return;
              }
              isErrorRetryable = true;
          }
          else {
              errorCode = ServiceException.INTERNAL_ERROR;
              isErrorRetryable = false;
          }
  
          if (isErrorRetryable) {
              super.setReturnCode(ActivityResultCodeConstant.RESULT_RETRY);
          }
  
          this.handleAdapterFailure(errorCode, errorCause);
      }
docs: This method should not normally be overriden. When you override execute() method,
  you will need to invoke this for any exception caught.
  @param errorCause
  @throws ActivityException