diff --git a/Interfaces/ZUGFeRDInterface.vb b/Interfaces/ZUGFeRDInterface.vb index 75c4bc15..ab62b7e4 100644 --- a/Interfaces/ZUGFeRDInterface.vb +++ b/Interfaces/ZUGFeRDInterface.vb @@ -311,7 +311,8 @@ Public Class ZUGFeRDInterface Next If oObject Is Nothing Then - Throw New ApplicationException("No Types matched the given document. Document could not be serialized.") + 'Throw New ApplicationException("No Types matched the given document. Document could not be serialized.") + Throw New ZUGFeRDExecption(ErrorType.UnsupportedFormat, "Unsupported Format") End If pResult.Specification = oSpecification @@ -319,6 +320,10 @@ Public Class ZUGFeRDInterface Return pResult + Catch ex As ZUGFeRDExecption + _logger.Error(ex) + Throw ex + Catch ex As Exception _logger.Error(ex) Dim oMessage = "Datei ist eine ungültige ZUGFeRD Datei oder das Format wird nicht unterstüzt, oder das Format ist deaktiviert."