diff --git a/Interfaces/ZUGFeRDInterface.vb b/Interfaces/ZUGFeRDInterface.vb index 190f11b9..0c04fed8 100644 --- a/Interfaces/ZUGFeRDInterface.vb +++ b/Interfaces/ZUGFeRDInterface.vb @@ -220,7 +220,7 @@ Public Class ZUGFeRDInterface Try Dim oNavigator As XPathNavigator = pDocument.Item2.CreateNavigator() Dim oReader As XmlReader - Dim oResult = Nothing + Dim oObject As Object = Nothing Dim oAllowedTypes As New List(Of Type) @@ -242,7 +242,7 @@ Public Class ZUGFeRDInterface Try oReader = oNavigator.ReadSubtree() - oResult = oSerializer.Deserialize(oReader) + oObject = oSerializer.Deserialize(oReader) _logger.Debug("Serializing with type [{0}] succeeded", oType.FullName) Exit For Catch ex As Exception @@ -252,11 +252,11 @@ Public Class ZUGFeRDInterface End Try Next - If oResult Is Nothing Then + If oObject Is Nothing Then Throw New ApplicationException("No Types matched the given document. Document could not be serialized.") End If - Return oResult + Return New Tuple(Of String, Object)(pDocument.Item1, oObject) Catch ex As Exception _logger.Error(ex)