Bug 467856 - Expose SQLITE_IOERR, r=sdwilsh
authorMarco Bonardo <mak77@bonardo.net>
Tue, 09 Dec 2008 21:39:32 +0100
changeset 22557 bad1a35faa154deabba94d58e3d8f89cce066f06
parent 22556 b6aec13be588f062ca6accbf68aef52c8cd896a6
child 22558 99dca569239976d10a7215cce6a57cd3aae9ea07
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssdwilsh
bugs467856
milestone1.9.2a1pre
Bug 467856 - Expose SQLITE_IOERR, r=sdwilsh
storage/public/mozStorage.h
storage/src/mozStoragePrivateHelpers.h
--- a/storage/public/mozStorage.h
+++ b/storage/public/mozStorage.h
@@ -37,9 +37,12 @@
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef _MOZSTORAGE_H_
 #define _MOZSTORAGE_H_
 
 #define NS_ERROR_STORAGE_BUSY \
   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_STORAGE, 1)
 
+#define NS_ERROR_STORAGE_IOERR \
+  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_STORAGE, 2)
+
 #endif /* _MOZSTORAGE_H_ */
--- a/storage/src/mozStoragePrivateHelpers.h
+++ b/storage/src/mozStoragePrivateHelpers.h
@@ -68,16 +68,18 @@ ConvertResultCode(int srv)
         case SQLITE_CANTOPEN:
             return NS_ERROR_FILE_ACCESS_DENIED;
         case SQLITE_BUSY:
             return NS_ERROR_STORAGE_BUSY;
         case SQLITE_LOCKED:
             return NS_ERROR_FILE_IS_LOCKED;
         case SQLITE_READONLY:
             return NS_ERROR_FILE_READ_ONLY;
+        case SQLITE_IOERR:
+            return NS_ERROR_STORAGE_IOERR;
         case SQLITE_FULL:
         case SQLITE_TOOBIG:
             return NS_ERROR_FILE_NO_DEVICE_SPACE;
         case SQLITE_NOMEM:
             return NS_ERROR_OUT_OF_MEMORY;
         case SQLITE_MISUSE:
             return NS_ERROR_UNEXPECTED;
         case SQLITE_ABORT: