summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-11-08 02:00:00 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-11-08 02:00:00 +0000
commit95a9597217e3156b71a5ea8c203b1e5e78e0dd1b (patch)
tree8986c1609181bc6a26578b608436dfd00ce09360
parentUse typedef pointer (diff)
downloadlibdbpp-95a9597217e3156b71a5ea8c203b1e5e78e0dd1b.tar.bz2
libdbpp-95a9597217e3156b71a5ea8c203b1e5e78e0dd1b.tar.xz
libdbpp-95a9597217e3156b71a5ea8c203b1e5e78e0dd1b.zip
Expose exceptions
-rw-r--r--libdbpp/selectcommand.cpp13
-rw-r--r--libdbpp/selectcommand.h13
2 files changed, 15 insertions, 11 deletions
diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp
index 7e72ee5..792af12 100644
--- a/libdbpp/selectcommand.cpp
+++ b/libdbpp/selectcommand.cpp
@@ -4,18 +4,9 @@
#include <boost/multi_index/ordered_index.hpp>
namespace DB {
- class ColumnIndexOutOfRange : public Error {
- public:
- ColumnIndexOutOfRange(unsigned int n) : colNo(n) { }
+ ColumnIndexOutOfRange::ColumnIndexOutOfRange(unsigned int n) : colNo(n) { }
- const unsigned int colNo;
- };
- class ColumnDoesNotExist : public Error {
- public:
- ColumnDoesNotExist(const Glib::ustring & n) : colName(n) { }
-
- const Glib::ustring colName;
- };
+ ColumnDoesNotExist::ColumnDoesNotExist(const Glib::ustring & n) : colName(n) { }
};
DB::SelectCommand::SelectCommand(const std::string & sql) :
diff --git a/libdbpp/selectcommand.h b/libdbpp/selectcommand.h
index 1586357..8c9af13 100644
--- a/libdbpp/selectcommand.h
+++ b/libdbpp/selectcommand.h
@@ -3,6 +3,7 @@
#include "command.h"
#include "column.h"
+#include "error.h"
#include <boost/multi_index_container_fwd.hpp>
#include <boost/multi_index/indexed_by.hpp>
#include <boost/multi_index/ordered_index_fwd.hpp>
@@ -13,6 +14,18 @@
namespace DB {
class Column;
+ class ColumnIndexOutOfRange : public Error {
+ public:
+ ColumnIndexOutOfRange(unsigned int n);
+
+ const unsigned int colNo;
+ };
+ class ColumnDoesNotExist : public Error {
+ public:
+ ColumnDoesNotExist(const Glib::ustring & n);
+
+ const Glib::ustring colName;
+ };
/// Represents a command expected to return data to the client.
class DLL_PUBLIC SelectCommand : public virtual Command {
public: