Added error handler when sandbox creaton fails.

ranzbak [2011-04-28 18:27]
Added error handler when sandbox creaton fails.


git-svn-id: https://old.setv.nl/svn/swarmtv@305 88541080-9ad6-de11-9093-5254007c1f44
Filename
trunk/qtswarmtv/testfilterdialog.cpp
diff --git a/trunk/qtswarmtv/testfilterdialog.cpp b/trunk/qtswarmtv/testfilterdialog.cpp
index 76e8ea6..dd20a49 100644
--- a/trunk/qtswarmtv/testfilterdialog.cpp
+++ b/trunk/qtswarmtv/testfilterdialog.cpp
@@ -3,6 +3,7 @@
 #include <sqlite3.h>
 #include <stdlib.h>
 #include <swarmtv.h>
+#include <QMessageBox>

 #include "testfilterdialog.hpp"
 #include "ui_testfilterdialog.h"
@@ -42,6 +43,13 @@ void testFilterDialog::handleTest(simplefilter_struct &simple)

   // Do Filter test
   rc = rsstfindnewtorrents(&simple, &newtorrents, 150, 0);
+  if(rc != 0) {
+    QMessageBox::warning(this, tr("SwarmTv"),
+                         tr("Could not open the sandbox file."),
+                         QMessageBox::Ok);
+    this->close();
+    return;
+  }

   // Fill Table
   fillTable(newtorrents);