/*
Get the failure reason from the message.

Javadoc description supplied by TrmClientBootstrapRequest interface.
964923
public List getFailureReason() {
    List fr =  (List)jmo.getField(TrmFirstContactAccess.BODY_CLIENTATTACHREPLY_FAILUREREASON);
    if (fr != null) {
      return new ArrayList(fr);
    } else {
      return null;
    }
  }
390377
String getLockerStatus(final DeviceProxy deviceProxy) throws DevFailed {
        final LockerInfo info = getLockerInfo(deviceProxy);
        return info.getStatus();
    }
607316
@JsonIgnore
    public String getErrorMessage(){
        StringBuilder sb = new StringBuilder();
        sb.append(exceptionCode.getCode()).append(":").append(exceptionCode.getMessage());
        if(this.message != null && ! this.message.isEmpty()){
            sb.append(" - ").append(message);
        }
        return sb.toString();
    }
470468
public final String getExceptionMessage() {
        /* If the Exception information is set, return the translated message */
        if (getHdr2().getChoiceField(JsHdr2Access.EXCEPTION) != JsHdr2Access.IS_EXCEPTION_EMPTY) {
            return exceptionMessages.getFormattedMessage(MfpConstants.EXCEPTION_MESSAGE_KEY_PREFIX + getExceptionReason().toString()
                                                         , getExceptionInserts()
                                                         , "Failed to deliver message, rc=" + getExceptionReason() + ". Inserts: " + Arrays.asList(getExceptionInserts())
                            );
        }
        /* If no, just return null. */
        else {
            return null;
        }
    }
745774
public void requestFailed (Exception cause)
    {
        Object[] args = _args != null ? ArrayUtil.append(_args, cause) : new Object[] { cause };
        if (_slogger != null) {
            _slogger.warning(_errorText, args);
        } else if (_jlogger != null) {
            _jlogger.log(Level.WARNING, Logger.format(_errorText, args), cause);
        } else {
            System.err.println(Logger.format(_errorText, args));
        }
    }
148397
public Fail<Flow<T>> getOrCreateFail()
   {
      List<Node> nodeList = childNode.get("fail");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FailImpl<Flow<T>>(this, "fail", childNode, nodeList.get(0));
      }
      return createFail();
   }
277736
public void requestFailed(JSONObject info) {
        logger.error("BaseRequest failed with info: " + (info == null ? "info is null" : info.toString()));
        listener.onFailure(null, null, info);
    }
922169
public java.util.List<BatchResultErrorEntry> getFailed() {
        if (failed == null) {
            failed = new com.amazonaws.internal.SdkInternalList<BatchResultErrorEntry>();
        }
        return failed;
    }
784240
public String getMessage() {
	StringBuffer buf = new StringBuffer();
	if (code != UNSPECIFIED) {
	    buf.append(getCodeExplanation(code));
	}
	if (customMessage != null) {
	    buf.append(" Custom message: ");
	    buf.append(customMessage);
	}
	if (code != UNSPECIFIED) {
	    buf.append(" (error code ").append(String.valueOf(code)).append(")");
	}
	if (cause != null) {
	    buf.append(" [Nested exception message: ");
	    buf.append(cause.getMessage());
	    buf.append("]");
	}
	return buf.toString();
    }
768303
@Override public String getMessage() {
    String errnoName = OsConstants.errnoName(errno);
    if (errnoName == null) {
      errnoName = "errno " + errno;
    }
    String description = Libcore.os.strerror(errno);
    return functionName + " failed: " + errnoName + " (" + description + ")";
  }
136143
protected GoogleJsonError getDetails(IOException e) {
    if (e instanceof GoogleJsonResponseException) {
      return ((GoogleJsonResponseException) e).getDetails();
    }
    return null;
  }
1085781
public function getFailureMessage()
    {
        $message  = 'Connection to Gerrit "%s" via %s-DataService was not successful. ';
        $message .= 'Please check your credentials or setup.';
        $message = sprintf($message, $this->dataService->getHost(), $this->dataService->getName());

        return $message;
    }
8943
private String getFailureReason(final FileUploadId fileUploadId) {
        String failureReason = "";
        if (artifactUploadState.getFileUploadProgress(fileUploadId) != null) {
            failureReason = artifactUploadState.getFileUploadProgress(fileUploadId).getFailureReason();
        }
        if (StringUtils.isEmpty(failureReason)) {
            return "";
        }
        return failureReason;
    }
657148
def get_vdp_failure_reason(self, reply):
        
        try:
            fail_reason = reply.partition(
                "filter")[0].replace('\t', '').split('\n')[-2]
            if len(fail_reason) == 0:
                fail_reason = vdp_const.retrieve_failure_reason % (reply)
        except Exception:
            fail_reason = vdp_const.retrieve_failure_reason % (reply)
        return fail_reason
653507
public static void fail(String message, String reason)
  {
    if (message != null && message.length() > 0)
      fail(message + ": " + reason);
    else
      fail(reason);
  }
1277722
public String description(final Connection connection) throws DevFailed {

	build_connection(connection);

	return connection.device.description();
    }
1319051
function failure(exception) {
		var message;
		message = proto.writeFailure(exception);
		notify(message);
		return that;
	}