RiakClient.Erlang.OtpInputStream.OnBadTag C# (CSharp) Method

OnBadTag() private static method

private static OnBadTag ( byte got ) : Exception
got byte
return System.Exception
        private static Exception OnBadTag(byte got, params byte[] want)
        {
            string exmsg = null;
            if (want.Length == 1)
            {
                exmsg = string.Format(
                    "wrong tag encountered, expected {0}, got {1}",
                    want,
                    got);
            }
            else
            {
                exmsg = string.Format(
                    "wrong tag encountered, expected one of {0}, got {1}",
                    string.Join(", ", want),
                    got);
            }

            return new Exception(exmsg);
        }
    }