コード例 #1
0
            public override bool Fallback(byte[] bytesUnknown, int index)
            {
                // use the built-in logic to get a helpful exception message.
                var inner = new DecoderExceptionFallbackBuffer();

                try
                {
                    return(inner.Fallback(bytesUnknown, index));
                }
                catch (DecoderFallbackException ex)
                {
                    // wrap it.  C# / .NET do not support multiple inheritance, and I think it's
                    // more important for consumers to be able to catch CursivelyDataStreamException
                    // for all exceptions in the form of "this breaks one of Cursively's rules, but
                    // the system is otherwise operating normally".
                    throw new CursivelyHeadersAreNotUTF8Exception(ex);
                }
            }
コード例 #2
0
 public static bool Fallback(DecoderExceptionFallbackBuffer aThis, byte[] bytesUnknown, int index)
 {
     throw new NotImplementedException("DecoderExceptionFallbackBuffer Fallback()");
 }