diff options
Diffstat (limited to 'src/net/cbaines/suca/SotonCalendarParser.java')
-rw-r--r-- | src/net/cbaines/suca/SotonCalendarParser.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/net/cbaines/suca/SotonCalendarParser.java b/src/net/cbaines/suca/SotonCalendarParser.java index 38b6ac2..7734dc5 100644 --- a/src/net/cbaines/suca/SotonCalendarParser.java +++ b/src/net/cbaines/suca/SotonCalendarParser.java @@ -5,7 +5,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; -import java.net.URISyntaxException; import java.text.ParseException; import java.util.ArrayList; import java.util.Calendar; @@ -58,10 +57,9 @@ public class SotonCalendarParser implements CalendarParser { * * @param in * @param handler - * @throws IOException - * @throws ParserException + * @throws ParseException */ - public void parse(BufferedReader in, ContentHandler handler) throws IOException, ParserException { + public void parse(BufferedReader in, ContentHandler handler) throws ParserException { try { log("Year " + Calendar.getInstance().get(Calendar.YEAR)); int currentYear = Calendar.getInstance().get(Calendar.YEAR); @@ -72,7 +70,6 @@ public class SotonCalendarParser implements CalendarParser { handler.endProperty(Property.NAME); handler.startProperty(Property.VERSION); handler.propertyValue("2.0"); - handler.endProperty(Property.VERSION); handler.startProperty(Property.PRODID); handler.propertyValue("-//Chris Baines + Henco Appel//SouthamptonUniversityOrganiser//EN"); handler.endProperty(Property.NAME); @@ -524,12 +521,9 @@ public class SotonCalendarParser implements CalendarParser { } handler.endCalendar(); - } catch (ParseException e) { - e.printStackTrace(); - } catch (URISyntaxException e) { - e.printStackTrace(); - } catch (NumberFormatException e) { + } catch (Exception e) { e.printStackTrace(); + throw new ParserException("Error parsing csv", 0); } } |