-Added Path to JsonReaderException, JsonSchemaException and ValidationEventArgs

-Fixed Path on JsonValidatingReader
-Fixed path queries over constructors
This commit is contained in:
James Newton-King
2012-02-25 16:44:07 +13:00
parent 0d6ad0b76e
commit fb2a5998bc
14 changed files with 142 additions and 47 deletions
+9 -1
View File
@@ -111,6 +111,14 @@ namespace Newtonsoft.Json
get { return _reader.Depth; }
}
/// <summary>
/// Gets the path of the current JSON token.
/// </summary>
public override string Path
{
get { return _reader.Path; }
}
/// <summary>
/// Gets the quotation mark character used to enclose the value of a string.
/// </summary>
@@ -246,7 +254,7 @@ namespace Newtonsoft.Json
? message + " Line {0}, position {1}.".FormatWith(CultureInfo.InvariantCulture, lineInfo.LineNumber, lineInfo.LinePosition)
: message;
OnValidationEvent(new JsonSchemaException(exceptionMessage, null, lineInfo.LineNumber, lineInfo.LinePosition));
OnValidationEvent(new JsonSchemaException(exceptionMessage, null, Path, lineInfo.LineNumber, lineInfo.LinePosition));
}
private void OnValidationEvent(JsonSchemaException exception)