Add logging offset for Json parsing errors
This commit is contained in:
@@ -23,8 +23,9 @@ namespace Log
|
||||
/// Init
|
||||
/// </summary>
|
||||
/// <param name="error">Parsing error code.</param>
|
||||
JsonParseException(ErrorCode error)
|
||||
: JsonParseException(error, String::Empty)
|
||||
/// <param name="offset">Parsing error location.</param>
|
||||
JsonParseException(ErrorCode error, size_t offset)
|
||||
: JsonParseException(error, offset, String::Empty)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -32,9 +33,10 @@ namespace Log
|
||||
/// Creates default exception with additional data
|
||||
/// </summary>
|
||||
/// <param name="error">Parsing error code.</param>
|
||||
/// <param name="offset">Parsing error location.</param>
|
||||
/// <param name="additionalInfo">Additional information that help describe error</param>
|
||||
JsonParseException(ErrorCode error, const String& additionalInfo)
|
||||
: Exception(String::Format(TEXT("Parsing Json failed with error code {0}. {1}"), static_cast<int32>(error), GetParseError_En(error)), additionalInfo)
|
||||
JsonParseException(ErrorCode error, size_t offset, const String& additionalInfo)
|
||||
: Exception(String::Format(TEXT("Parsing Json failed with error code {0} (offset {2}). {1}"), static_cast<int32>(error), GetParseError_En(error), offset), additionalInfo)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user