From 4d9582de777f3f9c9543ed1102e6da7bee2c95e9 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Mon, 27 Feb 2012 14:02:26 -0500 Subject: [PATCH] More general catching of Exceptions in interval reading to throw MalformedFile exception in all cases -- Now throws UserException no matter what happens during the reading of the intervals file. --- .../org/broadinstitute/sting/commandline/IntervalBinding.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java b/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java index 9e2c9a818..0c6096e0c 100644 --- a/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java +++ b/public/java/src/org/broadinstitute/sting/commandline/IntervalBinding.java @@ -98,8 +98,8 @@ public final class IntervalBinding { intervals.add(toolkit.getGenomeLocParser().createGenomeLoc(feature)); line = lineReader.readLine(); } - } catch (IOException e) { - throw new UserException("Problem reading the interval file " + featureIntervals.getSource() + "; " + e.getMessage()); + } catch (Exception e) { + throw new UserException.MalformedFile(featureIntervals.getSource(), "Problem reading the interval file", e); } } else {