Interfaces: fix Zugferd exceptions

This commit is contained in:
Jonathan Jenne 2023-02-28 14:56:01 +01:00
parent 89fbc4e4ae
commit f3afadc3b7

View File

@ -311,7 +311,8 @@ Public Class ZUGFeRDInterface
Next Next
If oObject Is Nothing Then 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 End If
pResult.Specification = oSpecification pResult.Specification = oSpecification
@ -319,6 +320,10 @@ Public Class ZUGFeRDInterface
Return pResult Return pResult
Catch ex As ZUGFeRDExecption
_logger.Error(ex)
Throw ex
Catch ex As Exception Catch ex As Exception
_logger.Error(ex) _logger.Error(ex)
Dim oMessage = "Datei ist eine ungültige ZUGFeRD Datei oder das Format wird nicht unterstüzt, oder das Format ist deaktiviert." Dim oMessage = "Datei ist eine ungültige ZUGFeRD Datei oder das Format wird nicht unterstüzt, oder das Format ist deaktiviert."