• 고객센터
  • 교육
  • 매뉴얼
  • 데모
  • 제품소개
기술지원31
조회 수 : 1900
2010.06.14 (13:23:01)

    public void printResult(boolean isSuccess)
    {
        String msg = isSuccess ? null : "FAIL";
        printResult(isSuccess, msg);
    }

    public void printResult(boolean isSuccess, String strErrorMsg)
    {
        if(isSuccess)
        {
            if(m_protocol == 0)
                m_protocol = m_service.getContext().getResponseProtocol();
            if(m_response == null)
                m_response = m_service.getGauceResponse(m_protocol);
            try
            {
                m_response.commit(strErrorMsg);
            }
            catch(IOException ioe)
            {
                throw new RuntimeException("Can not commit Gauce transaction!rnt" + ioe.toString());
            }
        } else
        {
            printError("-75000", "[GAUCE--75000] " + strErrorMsg, "printResult");
        }
    }

    public void printResult(String sType, String sCode, String strErrorMsg)
    {
        printError(sType, sCode, strErrorMsg, null);
    }


private void printError(String strErrorCode, String strErrorMsg, String strMethod)
    {
        printError("App", strErrorCode, strErrorMsg, null);
    }

    private void printError(String strErrType, String strErrorCode, String strErrorMsg, String strMethod)
    {
        if(m_protocol == 0)
            m_protocol = m_service.getContext().getResponseProtocol();
        if(m_response == null)
            m_response = m_service.getGauceResponse(m_protocol);
        try
        {
            m_response.writeException(strErrType, strErrorCode, strErrorMsg);
            m_response.commit();
        }
        catch(IOException ioe)
        {
            throw new RuntimeException("Can not write ERROR message!rnt" + ioe.toString());
        }
    }


Tag List
XE Login