have psParser cleanup temp file

pull/27/head
reger 9 years ago
parent 7d0d19cb8e
commit 0d3c5b223e

@ -113,7 +113,7 @@ public class psParser extends AbstractParser implements Parser {
"", // publisher
null, // sections
null, // abstract
0.0f, 0.0f,
0.0d, 0.0d,
outputFile, // fulltext
null, // anchors
null, // rss
@ -125,12 +125,11 @@ public class psParser extends AbstractParser implements Parser {
} 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);
}
}

Loading…
Cancel
Save