summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Krennmair <ak@synflood.at>2007-08-03 09:05:50 +0000
committerAndreas Krennmair <ak@synflood.at>2007-08-03 09:05:50 +0000
commit6041cee5682b5f3270337b0a923fe3e517fcc92e (patch)
treeeb4ce60db13245e7075f920d5d570c6f54fdf476
parent56f15c52c11beb6ae42f9cfd0f08ffa846a15257 (diff)
-rw-r--r--include/exceptions.h15
-rw-r--r--src/cache.cpp4
-rw-r--r--src/controller.cpp4
3 files changed, 5 insertions, 18 deletions
diff --git a/include/exceptions.h b/include/exceptions.h
index 074ac613..b236957f 100644
--- a/include/exceptions.h
+++ b/include/exceptions.h
@@ -4,8 +4,6 @@
#include <stdexcept>
#include <string>
-#include <sqlite3.h>
-
namespace newsbeuter {
class xmlexception : public std::exception {
@@ -23,18 +21,9 @@ class configexception : public std::exception {
virtual ~configexception() throw() { }
virtual const char * what() const throw() { return msg.c_str(); }
private:
- std::string msg;
+ std::string msg;
};
-
-class dbexception : public std::exception {
- public:
- dbexception(sqlite3 * h) : msg(sqlite3_errmsg(h)) { }
- virtual ~dbexception() throw() { }
- virtual const char * what() const throw() { return msg.c_str(); }
- private:
- std::string msg;
-};
-
+
}
#endif /*EXCEPTIONS_H_*/
diff --git a/src/cache.cpp b/src/cache.cpp
index 339b9136..12d2f426 100644
--- a/src/cache.cpp
+++ b/src/cache.cpp
@@ -10,7 +10,6 @@
#include <rss.h>
#include <logger.h>
#include <config.h>
-#include <exceptions.h>
using namespace newsbeuter;
@@ -171,9 +170,8 @@ void cache::set_pragmas() {
if (rc != SQLITE_OK) {
GetLogger().log(LOG_CRITICAL,"setting PRAGMA synchronous = OFF failed");
- throw dbexception(db);
}
- // assert(rc == SQLITE_OK);
+ assert(rc == SQLITE_OK);
// then we disable case-sensitive matching for the LIKE operator in SQLite, for search operations
rc = sqlite3_exec(db, "PRAGMA case_sensitive_like=OFF;", NULL, NULL, NULL);
diff --git a/src/controller.cpp b/src/controller.cpp
index e4607d2a..8bb75b37 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -419,13 +419,13 @@ void controller::import_opml(const char * filename) {
ret = nxml_new (&data);
if (ret != NXML_OK) {
- puts (nxml_strerror (data, ret));
+ puts (nxml_strerror (ret));
return;
}
ret = nxml_parse_file (data, const_cast<char *>(filename));
if (ret != NXML_OK) {
- puts (nxml_strerror (data, ret));
+ puts (nxml_strerror (ret));
return;
}