Get the reason for failure if there any

@return A {@link String } value with failure reason
335357
public String getFailReason() {
        String causeMsg = "";
        try {
            JSONObject postObj = getObject();
            if (postObj != null
                    && postObj.has("error")
                    && postObj.getJSONObject("error").has("message")) {
                causeMsg = postObj.getJSONObject("error").getString("message");
                if (causeMsg != null && causeMsg.trim().length() > 0) {
                    causeMsg = causeMsg + ".";
                }
            }
        } catch (Exception ignore) {
        }
        return causeMsg;
    }
79629
public java.lang.String getResult() {
    java.lang.Object ref = result_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        result_ = s;
      }
      return s;
    }
  }
158156
public java.util.List<Evaluation> getFailedEvaluations() {
        if (failedEvaluations == null) {
            failedEvaluations = new com.amazonaws.internal.SdkInternalList<Evaluation>();
        }
        return failedEvaluations;
    }
683872
public String getMessage() {
    StringBuffer result = new StringBuffer();
    Iterator<IOException> itr = problems.iterator();
    while(itr.hasNext()) {
      result.append(itr.next().getMessage());
      if (itr.hasNext()) {
        result.append("\n");
      }
    }
    return result.toString();
  }
448954
public List<Fail<Decision<T>>> getAllFail()
   {
      List<Fail<Decision<T>>> list = new ArrayList<Fail<Decision<T>>>();
      List<Node> nodeList = childNode.get("fail");
      for(Node node: nodeList)
      {
         Fail<Decision<T>>  type = new FailImpl<Decision<T>>(this, "fail", childNode, node);
         list.add(type);
      }
      return list;
   }
284193
public String getDebugString()
    {
        final StringBuilder b = new StringBuilder();

        boolean first = true;

        for (final ValidationError e : m_errors)
        {
            if (first)
            {
                first = false;
            }
            else
            {
                b.append("\n");
            }
            b.append(e.getContext()).append(" - ").append(e.getMessage());
        }
        return b.toString();
    }
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();
    }
176532
public String getString() 
    {       // Usually overidden
        int maxLength = this.getMaxLength();
        String string = (String)this.getData();
        if (string == null)
            return Constants.BLANK;
        if (string.length() > maxLength)
            string = string.substring(0, maxLength);
        return string;
    }
964923
public List getFailureReason() {
    List fr =  (List)jmo.getField(TrmFirstContactAccess.BODY_CLIENTATTACHREPLY_FAILUREREASON);
    if (fr != null) {
      return new ArrayList(fr);
    } else {
      return null;
    }
  }
463019
public static String getError(JUnitTestData testMethod) {
        String error = "~";
        Throwable t = testMethod.getFailException();
        if (t != null) {
            error = t.getMessage();
        }
        return error;
    }
1280719
public String getReason()
    {
        if (_reason!=null)
            return _reason;
        _reason=(String)__statusMsg.get(TypeUtil.newInteger(_status));
        if (_reason==null)
            _reason="unknown";
        return _reason;
    }
93433
public java.lang.String getErrorMessage() {
    java.lang.Object ref = errorMessage_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        errorMessage_ = s;
      }
      return s;
    }
  }
14548
public String getString()
    {
        int len=getInt();
        if (len==0xFFFF)
            return null;
        try
        {
            String s=new String(_buf,_pos,len,StringUtil.__ISO_8859_1);
            _pos+=len+1;
            return s;
        }
        catch (IndexOutOfBoundsException e)
        {
            // Bad request!!!
            LogSupport.ignore(log,e);
            return null;
        }
        catch (UnsupportedEncodingException e)
        {
            log.fatal(e);
            System.exit(1);
            return null;
        }
    }
563295
public String getErrorString() {
        StringBuffer ret = new StringBuffer();
        String linesep = System.getProperty("line.separator");

        List<Exception> exc = getExceptions();
        if (exc != null && exc.size() != 0) {

            // ret.append(HBCIUtils.getLocMsg("STAT_EXCEPTIONS")).append(":").append(linesep);
            for (Iterator<Exception> j = exc.iterator(); j.hasNext(); ) {
                ret.append(HBCIUtils.exception2StringShort(j.next()));
                ret.append(linesep);
            }
        }

        HBCIDialogStatus status = getDialogStatus();
        if (status != null) {
            String errMsg = status.getErrorString();
            if (errMsg.length() != 0) {
                ret.append(errMsg + linesep);
            }
        }

        return ret.toString().trim();
    }
141941
@Override
  public String getMessage() {

    if (getValidationExceptions().size() == 0) {
      return super.getMessage();
    }

    StringBuffer sb = new StringBuffer();

    boolean first = true;

    for (Iterator iter = getValidationExceptions().iterator(); iter.hasNext(); ) {
      Exception e = (Exception) iter.next();

      if (!first) {
        sb.append('\n');
        first = false;
      }

      sb.append(e.getMessage());
    }

    return sb.toString();
  }
718978
public String getOutputAsString() {
		if (stringWriter != null) {
			return stringWriter.toString();
		} else if (outputStream != null) {
			String outputStr = null;

			byte[] bytes = outputStream.getOutput();
			if (bytes != null) {
				try {
					outputStr = new String(bytes, characterEncoding);
				} catch (UnsupportedEncodingException e) {
					outputStr = null;
				}
			}

			return outputStr;
		}

		return null;
	}
14543
def failed(self, reason=None):
        
        # 订单创建失败(如废单/场外废单/价格高于涨停价/价格低于跌停价/通讯失败)
        self._status = ORDER_STATUS.FAILED
        self.reason = str(reason)