From 978e2be95bc215eea193e01f9f3ba1be8748a2f6 Mon Sep 17 00:00:00 2001 From: luccioman Date: Wed, 28 Feb 2018 12:27:17 +0100 Subject: [PATCH] Let a chance for other parsers on audioTagParser error As done in all other parsers, eventually falling back in the end to the genericParser which creates a minimal index entry. --- .../yacy/document/parser/audioTagParser.java | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/source/net/yacy/document/parser/audioTagParser.java b/source/net/yacy/document/parser/audioTagParser.java index 0afeea427..7abd80917 100644 --- a/source/net/yacy/document/parser/audioTagParser.java +++ b/source/net/yacy/document/parser/audioTagParser.java @@ -314,27 +314,7 @@ public class audioTagParser extends AbstractParser implements Parser { }; return docs; } catch (final Exception e) { - // return a generic document as default - docs = new Document[]{new Document( - location, - mimeType, - charset, - this, - null, - null, - singleList(filename), // title - null, // author - location.getHost(), - null, - null, - 0.0d, 0.0d, - location.toTokens(), - null, - null, - null, - false, - new Date() - )}; + throw new Parser.Failure("Unexpected error while parsing audio file. " + e.getMessage(), location); } finally { if (tempFile != null) { tempFile.delete(); @@ -344,7 +324,6 @@ public class audioTagParser extends AbstractParser implements Parser { */ } } - return docs; } /**