]> Creatis software - creaImageIO.git/blobdiff - src/CppSQLite3.cpp
*** empty log message ***
[creaImageIO.git] / src / CppSQLite3.cpp
index 5d82661eb62e49e2fdce0f76ea6954d63bf62177..165f9110bebc1ed0baab8e592fc5e6d09ebebb9a 100644 (file)
@@ -45,21 +45,37 @@ int sqlite3_decode_binary(const unsigned char *in, unsigned char *out);
 ////////////////////////////////////////////////////////////////////////////////\r
 \r
 CppSQLite3Exception::CppSQLite3Exception(const int nErrCode,\r
-                                                                       char* szErrMess,\r
-                                                                       bool bDeleteMsg/*=true*/) :\r
-                                                                       mnErrCode(nErrCode)\r
-{\r
-       mpszErrMess = sqlite3_mprintf("%s[%d]: %s",\r
-                                                               errorCodeAsString(nErrCode),\r
-                                                               nErrCode,\r
-                                                               szErrMess ? szErrMess : "");\r
-\r
-       if (bDeleteMsg && szErrMess)\r
-       {\r
-               sqlite3_free(szErrMess);\r
-       }\r
+                                        const char* szErrMess,\r
+                                        bool bDeleteMsg/*=true*/) :\r
+  mnErrCode(nErrCode)\r
+{\r
+  mpszErrMess = sqlite3_mprintf("%s[%d]: %s",\r
+                               errorCodeAsString(nErrCode),\r
+                               nErrCode,\r
+                               szErrMess ? szErrMess : "");\r
+  /*\r
+  if (bDeleteMsg && szErrMess)\r
+    {\r
+      sqlite3_free(szErrMess);\r
+    }\r
+  */\r
 }\r
 \r
+CppSQLite3Exception::CppSQLite3Exception(const int nErrCode,\r
+                                        char* szErrMess,\r
+                                        bool bDeleteMsg/*=true*/) :\r
+  mnErrCode(nErrCode)\r
+{\r
+  mpszErrMess = sqlite3_mprintf("%s[%d]: %s",\r
+                               errorCodeAsString(nErrCode),\r
+                               nErrCode,\r
+                               szErrMess ? szErrMess : "");\r
+  \r
+  if (bDeleteMsg && szErrMess)\r
+    {\r
+      sqlite3_free(szErrMess);\r
+    }\r
+}\r
                                                                        \r
 CppSQLite3Exception::CppSQLite3Exception(const CppSQLite3Exception&  e) :\r
                                                                        mnErrCode(e.mnErrCode)\r
@@ -1310,7 +1326,7 @@ sqlite3_stmt* CppSQLite3DB::compile(const char* szSQL)
 ** data in an SQLite database.  The code in this file is not used by any other\r
 ** part of the SQLite library.\r
 **\r
-** $Id: CppSQLite3.cpp,v 1.1 2008/09/26 14:15:48 guigues Exp $\r
+** $Id: CppSQLite3.cpp,v 1.2 2008/12/15 12:54:44 guigues Exp $\r
 */\r
 \r
 /*\r