try {
line = new GnuParser().parse(options, args);
} catch (ParseException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ logger.error("Error parsing command-line options", e);
}
if(line.hasOption("license")) {
main.processOptions(args);
main.run();
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ logger.error("Error in tv_grab_nl_java application", e);
}
}
* @throws FileNotFoundException \r
*/\r
public static void main(String[] args) throws FileNotFoundException {\r
- /*\r
- Calendar result = Calendar.getInstance();\r
- Calendar d = Calendar.getInstance();\r
- try {\r
- d.setTime(new SimpleDateFormat("yyyy-MM-dd").parse("2012-04-16"));\r
- } catch (ParseException e2) {\r
- // TODO Auto-generated catch block\r
- e2.printStackTrace();\r
- }\r
-\r
- SimpleDateFormat df = new SimpleDateFormat("HH:mm");\r
- try {\r
- result.setTime(df.parse("04:50"));\r
- result.set(d.get(Calendar.YEAR), d.get(Calendar.MONTH), d.get(Calendar.DAY_OF_MONTH));\r
- System.out.println(result.getTime());\r
- System.exit(1);\r
- } catch (ParseException e1) {\r
- // TODO Auto-generated catch block\r
- e1.printStackTrace();\r
- }\r
- */\r
debug = true;\r
Config config = Config.getDefaultConfig();\r
config.niceMilliseconds = 50;\r
try {
url = new URL(channels_url);
} catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ logger.error("Exception creating tvgids channel list url", e);
}
StringBuffer json = new StringBuffer();
String s;
while ((s = reader.readLine()) != null) json.append(s);
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ logger.error("IO Exception reading channel information from tvgids url "+url.toString(), e);
}
logger.debug("tvgids channels json: " + json.toString());
}
gids.close();
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ logger.error("Error in tvgids testing", e);
}
}