2 // System.Web.Compilation.ParseException
5 // Gonzalo Paniagua Javier (gonzalo@ximian.com)
7 // (C) 2003 Ximian, Inc (http://www.ximian.com)
13 namespace System.Web.Compilation
15 internal class ParseException : HtmlizedException
23 public ParseException (string fileName, string message, int line, int col)
26 this.fileName = fileName;
27 this.message = message;
28 this.line = line >= 1 ? line : 1;
32 public ParseException (string fileName, string message, int line, int col, Exception inner)
33 : base (message, inner)
35 this.fileName = fileName;
36 this.message = message;
37 this.line = line >= 1 ? line : 1;
41 public override string Title {
42 get { return "Parser Error"; }
45 public override string Description {
47 return "Error parsing a resource required to service this request. " +
48 "Review your source file and modify it to fix this error.";
52 public override string ErrorMessage {
53 get { return message; }
56 public override string FileName {
57 get { return fileName; }
60 public override StringReader SourceError {
62 StreamReader input = new StreamReader (File.OpenRead (fileName));
63 string result = GetErrorLines (input, line - 1, out sourceErrorLine);
66 return new StringReader (result);
70 public override int SourceErrorLine {
71 get { return sourceErrorLine; }
74 public override TextReader SourceFile {