示例#1
0
 public ExceptionFreeserf(ErrorSystemType system, string description,
                          [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string file = "")
 {
     System           = system;
     Description      = description;
     SourceFile       = file;
     SourceLineNumber = lineNumber;
 }
示例#2
0
            public virtual void Write(ErrorSystemType subsystem, string text)
            {
                if (streamWriter == null)
                {
                    return;
                }

                Write($"{prefix}: [{subsystem}] { text}");
            }
示例#3
0
            public virtual void Write(ErrorSystemType subsystem, string text)
            {
                if (streamWriter == null)
                {
                    return;
                }

                if (logFilter != null && !logFilter(subsystem, text))
                {
                    return;
                }

                Write($"{DateTime.Now.ToString("HH:mm:ss")} {prefix}: [{subsystem}] { text}");
            }
示例#4
0
            public virtual void Write(ErrorSystemType subsystem, string text)
            {
                var stream = this[subsystem];

                if (stream == null)
                {
                    return;
                }

                stream += text;
                stream += Environment.NewLine;

                this.stream.Flush();
            }
示例#5
0
            public virtual Stream this[ErrorSystemType subsystem]
            {
                get
                {
                    if (this.stream == null)
                    {
                        return(null);
                    }

                    var stream = new Stream(this.stream);

                    stream += prefix + ": [" + subsystem.ToString() + "] ";

                    return(stream);
                }
            }
示例#6
0
        public ExceptionFreeserf(Game game, ErrorSystemType system, Exception inner, [CallerLineNumber] int lineNumber = 0,
                                 [CallerFilePath] string file = "")
            : base(inner.Message, inner)
        {
            if (inner is ExceptionFreeserf)
            {
                System      = (inner as ExceptionFreeserf).System;
                Description = (inner as ExceptionFreeserf).Description;
            }
            else
            {
                System      = system;
                Description = inner.Message;
            }

            SourceFile       = file;
            SourceLineNumber = lineNumber;
            Game             = game;
        }
示例#7
0
 public TPWMException(ErrorSystemType type, string message)
     : base(type, message)
 {
 }
示例#8
0
 public override void Write(ErrorSystemType subsystem, string text)
 {
     // do nothing
 }