forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTemplateParsingException.cs
More file actions
31 lines (28 loc) · 935 Bytes
/
Copy pathTemplateParsingException.cs
File metadata and controls
31 lines (28 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Web.Razor.Parser.SyntaxTree;
namespace ServiceStack.Razor.Templating
{
/// <summary>
/// Defines an exception that occurs during parsing of a template.
/// </summary>
public class TemplateParsingException : Exception
{
/// <summary>
/// Initialises a new instance of <see cref="TemplateParsingException"/>
/// </summary>
internal TemplateParsingException(RazorError error)
: base(error.Message)
{
Column = error.Location.CharacterIndex;
Line = error.Location.LineIndex;
}
/// <summary>
/// Gets the column the parsing error occured.
/// </summary>
public int Column { get; private set; }
/// <summary>
/// Gets the line the parsing error occured.
/// </summary>
public int Line { get; private set; }
}
}