コード例 #1
0
ファイル: InternalNGDebug.cs プロジェクト: Hengle/clapotis
        public static void      VerboseError(object message)
        {
            if (Conf.DebugMode != Conf.DebugState.Verbose)
            {
                return;
            }

            InternalNGDebug.LogError(message);
        }
コード例 #2
0
        public void     Dispose()
        {
            SafeUnwrapByteBuffer.pool.Push(this);

            if (this.buffer.Position != fallbackEndPosition)
            {
                if (Conf.DebugMode >= Conf.DebugState.Active)
                {
                    SafeUnwrapByteBuffer.dumps.Add(new UnwrapDump()
                    {
                        error    = this.getMessage(),
                        start    = this.fallbackEndPosition - this.chunkFieldLength - sizeof(Int32),
                        position = this.buffer.Position,
                        end      = this.fallbackEndPosition,
                        buffer   = buffer.GetRawBuffer()
                    });
                }

                InternalNGDebug.LogError(this.getMessage() + ": Start " + (this.fallbackEndPosition - this.chunkFieldLength) + " > Pos " + this.buffer.Position + " > End " + this.fallbackEndPosition + ".");
                this.buffer.Position = fallbackEndPosition;
            }
        }