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 "", // publisher
null, // sections null, // sections
null, // abstract null, // abstract
0.0f, 0.0f, 0.0d, 0.0d,
outputFile, // fulltext outputFile, // fulltext
null, // anchors null, // anchors
null, // rss null, // rss
@ -125,12 +125,11 @@ public class psParser extends AbstractParser implements Parser {
} catch (final Exception e) { } catch (final Exception e) {
if (e instanceof InterruptedException) throw (InterruptedException) e; if (e instanceof InterruptedException) throw (InterruptedException) e;
if (e instanceof Parser.Failure) throw (Parser.Failure) e; if (e instanceof Parser.Failure) throw (Parser.Failure) e;
// delete temp file
if (outputFile != null) FileUtils.deletedelete(outputFile);
// throw exception // throw exception
throw new Parser.Failure("Unexpected error while parsing ps file. " + e.getMessage(),location); 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