Skip to content

Commit

Permalink
added to exception method to indicate data type mismatch
Browse files Browse the repository at this point in the history
if we cannot deserialize, we may need to change the target data type that we are trying to deserialize into
  • Loading branch information
rudolfolah committed Jun 21, 2023
1 parent 6f1e8dc commit 629a130
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public bool Deserialize(IParser parser, Type expectedType, Func<IParser, Type, o
}
catch (Exception ex)
{
throw new YamlException(propertyName.Start, propertyName.End, "Exception during deserialization", ex);
throw new YamlException(propertyName.Start, propertyName.End, "Exception during deserialization, check the target data type", ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public NodeValueDeserializer(IList<INodeDeserializer> deserializers, IList<INode
throw new YamlException(
nodeEvent?.Start ?? Mark.Empty,
nodeEvent?.End ?? Mark.Empty,
"Exception during deserialization",
"Exception during deserialization, check the target data type",
ex
);
}
Expand Down

0 comments on commit 629a130

Please sign in to comment.