~alexreg/mathtexdotnet/0.1

« back to all changes in this revision

Viewing changes to TexDotNet/Syntax/LexerException.cs

  • Committer: Alex Regueiro
  • Date: 2009-09-22 01:27:08 UTC
  • Revision ID: alexreg@gmail.com-20090922012708-08rzfuxv1gty8w9g
Added 'Tex' prefix to all appropiate classes in project.
Improved error handling in lexer and parser. (Redesigned error functionality around TexErrorSourceInfoException and ITexErrorSourceInfo).
Implemented TexWriter class.
Started design of TexComposer class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
using System;
2
 
using System.Collections.Generic;
3
 
using System.Linq;
4
 
using System.Text;
5
 
 
6
 
namespace TexDotNet
7
 
{
8
 
    public class LexerException : Exception
9
 
    {
10
 
        public LexerException(int position, string message)
11
 
            : base(message)
12
 
        {
13
 
            this.Position = position;
14
 
        }
15
 
 
16
 
        public int Position
17
 
        {
18
 
            get;
19
 
            private set;
20
 
        }
21
 
 
22
 
        public override string Message
23
 
        {
24
 
            get
25
 
            {
26
 
                return base.Message + Environment.NewLine +
27
 
                    string.Format("Charcter position: {0}", this.Position);
28
 
            }
29
 
        }
30
 
    }
31
 
}