hessiancsharp.io.CHessianOutput.WriteFault C# (CSharp) Method

WriteFault() public method

Writes a fault. The fault will be written as a descriptive string followed by an object: f <string>code <string>the fault code <string>message <string>the fault mesage <string>detail mt\x00\xnnException ... z z
public WriteFault ( string strCode, string strMessage, object objDetail ) : void
strCode string code the fault code
strMessage string fault message
objDetail object fault detail
return void
        public override void WriteFault(string strCode, string strMessage, object objDetail)
        {
            m_srOutput.WriteByte((byte)CHessianProtocolConstants.PROT_REPLY_FAULT);

            WriteString("code");
            WriteString(strCode);

            WriteString("message");
            WriteString(strMessage);

            if (objDetail != null)
            {
                WriteString("detail");
                WriteObject(objDetail);
            }
            m_srOutput.WriteByte((byte) (PROT_REPLY_END));
        }