Example #1
0
        public static void Handle(Exception err, string exception, string id, ErrorLevel errorLevel)
        {
            DebugStreamReader reader = TextFileHelper.LastReader;

            if (reader != null)
            {
                Handle(err, String.Format("ID: {0}, file: '{1}', line: {2}, exception: '{3}'", id, TextFileHelper.LatestFile, reader.LineNumber, exception), errorLevel);
            }
            else
            {
                Handle(err, String.Format("ID: {0}, exception: '{1}'", id, exception), errorLevel);
            }
        }
Example #2
0
        public static void HandleLoader(Exception err, string exception)
        {
            DebugStreamReader reader = TextFileHelper.LastReader;

            if (reader != null)
            {
                Handle(err, String.Format("file: '{0}', line: {1}, exception: '{2}'", TextFileHelper.LatestFile, reader.LineNumber, exception), ErrorLevel.Warning);
            }
            else
            {
                Handle(err, String.Format("exception: '{0}'", exception), ErrorLevel.Warning);
            }
        }
Example #3
0
        public static void Handle(Exception err, string exception, string id, int line, ErrorLevel errorLevel)
        {
            if (line < 0)
            {
                Handle(err, exception, id, errorLevel);
                return;
            }

            DebugStreamReader reader = TextFileHelper.LastReader;

            if (reader != null)
            {
                Handle(err, String.Format("ID: {0}, file: '{1}', line: {2}, exception: '{3}'", id, TextFileHelper.LatestFile, line, exception), errorLevel);
            }
            else
            {
                Handle(err, String.Format("ID: {0}, line: {1}, exception: '{2}'", id, line, exception), errorLevel);
            }
        }