ExpressionParseException.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (c) The Avalonia Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System;
  4. namespace Avalonia.Data.Core
  5. {
  6. /// <summary>
  7. /// Exception thrown when <see cref="ExpressionObserver"/> could not parse the provided
  8. /// expression string.
  9. /// </summary>
  10. #if !BUILDTASK
  11. public
  12. #endif
  13. class ExpressionParseException : Exception
  14. {
  15. /// <summary>
  16. /// Initializes a new instance of the <see cref="ExpressionParseException"/> class.
  17. /// </summary>
  18. /// <param name="column">The column position of the error.</param>
  19. /// <param name="message">The exception message.</param>
  20. /// <param name="innerException">The exception that caused the parsing failure.</param>
  21. public ExpressionParseException(int column, string message, Exception innerException = null)
  22. : base(message, innerException)
  23. {
  24. Column = column;
  25. }
  26. /// <summary>
  27. /// Gets the column position at which the error occurred.
  28. /// </summary>
  29. public int Column { get; }
  30. }
  31. }