summaryrefslogtreecommitdiff
path: root/include/sqlite3xx/except.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/sqlite3xx/except.hpp')
-rw-r--r--include/sqlite3xx/except.hpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/include/sqlite3xx/except.hpp b/include/sqlite3xx/except.hpp
index 2577e85..6a70216 100644
--- a/include/sqlite3xx/except.hpp
+++ b/include/sqlite3xx/except.hpp
@@ -32,20 +32,40 @@ using namespace std;
namespace sqlite3xx {
-class SQLITEXX_LIBEXPORT sql_error : runtime_error {
- string _m;
- string _q;
+class SQLITEXX_LIBEXPORT sqlitexx_exception {
+ public:
+ virtual ~sqlitexx_exception( ) throw( ) = 0;
+
+ virtual exception &base( ) throw( ) = 0;
+};
+
+class SQLITEXX_LIBEXPORT failure : public sqlitexx_exception, public runtime_error
+{
+ virtual exception &base( ) throw( ) { return *this; }
+
+ public:
+ explicit failure( const string &s );
+};
+
+class SQLITEXX_LIBEXPORT sql_error : public failure {
+ string m_q;
public:
sql_error( );
- explicit sql_error( string& q );
- explicit sql_error( string& __m, string& q );
+ explicit sql_error( const string& _q );
+ explicit sql_error( const string& _m, const string& _q );
virtual ~sql_error( ) throw( );
const string& msg( ) const throw( );
const string& query( ) const throw( );
};
+/*
+class SQLITEXX_LIBEXPORT db_locked : sql_error {
+ public:
+ explicit db_locket( string &q );
+};
+*/
}
#endif /* SQLITE3XX_EXCEPT_H */