ParseException.cs 934 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // System.Web.Compilation.ParseException
  3. //
  4. // Authors:
  5. // Gonzalo Paniagua Javier ([email protected])
  6. //
  7. // (C) 2003 Ximian, Inc (http://www.ximian.com)
  8. //
  9. using System;
  10. using System.IO;
  11. namespace System.Web.Compilation
  12. {
  13. internal class ParseException : HtmlizedException
  14. {
  15. string message;
  16. ILocation location;
  17. public ParseException (ILocation location, string message)
  18. {
  19. if (location == null)
  20. throw new Exception ();
  21. this.location = location;
  22. this.message = message;
  23. }
  24. public override string Title {
  25. get { return "Parser Error"; }
  26. }
  27. public override string Description {
  28. get {
  29. return "Error parsing a resource required to service this request. " +
  30. "Review your source file and modify it to fix this error.";
  31. }
  32. }
  33. public override string ErrorMessage {
  34. get { return message; }
  35. }
  36. public override string FileName {
  37. get { return location.Filename; }
  38. }
  39. }
  40. }