summaryrefslogtreecommitdiff
path: root/src/except.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/except.cpp')
-rw-r--r--src/except.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/except.cpp b/src/except.cpp
index cda8c7f..5ae357d 100644
--- a/src/except.cpp
+++ b/src/except.cpp
@@ -20,33 +20,35 @@
namespace sqlite3xx {
-sql_error::sql_error( ) :
- runtime_error( "failed query" ),
- _m( ),
- _q( ) {
+sqlitexx_exception::~sqlitexx_exception( ) throw( )
+{
}
-sql_error::sql_error( string& __m ) :
- runtime_error( __m ),
- _m( __m ),
- _q( ) {
+failure::failure( const string &_what )
+ : sqlitexx_exception( ), runtime_error( _what )
+{
}
-sql_error::sql_error( string& __m, string& q ) :
- runtime_error( __m ),
- _m( __m ),
- _q( q ) {
+sql_error::sql_error( )
+ : failure( "failed query" ), m_q( )
+{
}
-sql_error::~sql_error( ) throw( ){
+sql_error::sql_error( const string &_what )
+ : failure( _what ), m_q( )
+{
+}
+
+sql_error::sql_error( const string &_what, const string &_q )
+ : failure( _what ), m_q( _q )
+{
}
-const string& sql_error::msg( ) const throw( ) {
- return _m;
+sql_error::~sql_error( ) throw( ){
}
const string& sql_error::query( ) const throw( ) {
- return _q;
+ return m_q;
}
} /* namespace sqlite3xx */