(no commit message)
[utils] / crawler / kiss / src / org / wamblee / crawler / kiss / main / KissCrawler.java
index b0be9ef6cede2918bbf842ae98617f6a0d87afc5..31eb28783713dbc982808a218f879a49e315c2bc 100644 (file)
@@ -259,10 +259,15 @@ public class KissCrawler {
      * @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 {