Interfaces: Dont log ZUGFeRD Exceptions while validating, leads to misleading error messages

This commit is contained in:
Jonathan Jenne 2020-04-22 10:47:09 +02:00
parent afe42e52c0
commit 99e7a36d84

View File

@ -141,6 +141,10 @@ Public Class ZUGFeRDInterface
Try
Dim oResults = oAttachmentExtractor.Extract(Path, oAllowedExtensions)
Return HandleAttachments(oResults)
Catch ex As ZUGFeRDExecption
' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code.
' It also produces misleading error messages when checking if an attachment is a zugferd file.
Throw ex
Catch ex As Exception
_logger.Error(ex)
Throw ex
@ -178,6 +182,10 @@ Public Class ZUGFeRDInterface
End Using
Return oXmlDocument
Catch ex As ZUGFeRDExecption
' Don't log ZUGFeRD Exceptions here, they should be handled by the calling code.
' It also produces misleading error messages when checking if an attachment is a zugferd file.
Throw ex
Catch ex As Exception
_logger.Error(ex)
Throw ex