Crawler crawler = createCrawler(aCrawlerConfig, client, transformer);
InputStream programConfigFile = new FileInputStream(new File(
aProgramConfig));
- ProgramConfigurationParser parser = new ProgramConfigurationParser(
- transformer);
+ ProgramConfigurationParser parser = new ProgramConfigurationParser();
parser.parse(programConfigFile);
List<ProgramFilter> programFilters = parser.getFilters();
* @param aReport
* Report to use.
* @return TV guide.
+ * @throws PageException In case of problem getting the tv guide.
*/
- private TVGuide createGuide(Page aPage, Report aReport) {
+ private TVGuide createGuide(Page aPage, Report aReport) throws PageException {
LOG.info("Obtaining full TV guide");
Action[] actions = aPage.getActions();
+ if ( actions.length == 0 ) {
+ LOG.error("No channels found");
+ throw new PageException("No channels found");
+ }
List<Channel> channels = new ArrayList<Channel>();
for (Action action : actions) {
try {