Skip to content

Commit

Permalink
have psParser cleanup temp file
Browse files Browse the repository at this point in the history
  • Loading branch information
reger committed Nov 17, 2015
1 parent 7d0d19c commit 0d3c5b2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/net/yacy/document/parser/psParser.java
Expand Up @@ -113,7 +113,7 @@ private Document[] parse(final DigestURL location, final String mimeType, @Suppr
"", // publisher
null, // sections
null, // abstract
0.0f, 0.0f,
0.0d, 0.0d,
outputFile, // fulltext
null, // anchors
null, // rss
Expand All @@ -125,12 +125,11 @@ private Document[] parse(final DigestURL location, final String mimeType, @Suppr
} catch (final Exception e) {
if (e instanceof InterruptedException) throw (InterruptedException) e;
if (e instanceof Parser.Failure) throw (Parser.Failure) e;

// delete temp file
if (outputFile != null) FileUtils.deletedelete(outputFile);

// throw exception
throw new Parser.Failure("Unexpected error while parsing ps file. " + e.getMessage(),location);
} finally {
// delete temp file
if (outputFile != null) FileUtils.deletedelete(outputFile);
}
}

Expand Down

0 comments on commit 0d3c5b2

Please sign in to comment.