Bug 571581 - Propagate SQLITE_CONSTRAINT as an nsresult
r=asuth sr=vlad
This commit is contained in:
Родитель
2ae70b9f98
Коммит
f43b100215
|
@ -45,4 +45,7 @@
|
|||
#define NS_ERROR_STORAGE_IOERR \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_STORAGE, 2)
|
||||
|
||||
#define NS_ERROR_STORAGE_CONSTRAINT \
|
||||
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_STORAGE, 3)
|
||||
|
||||
#endif /* MOZSTORAGE_H */
|
||||
|
|
|
@ -89,6 +89,8 @@ convertResultCode(int aSQLiteResultCode)
|
|||
case SQLITE_ABORT:
|
||||
case SQLITE_INTERRUPT:
|
||||
return NS_ERROR_ABORT;
|
||||
case SQLITE_CONSTRAINT:
|
||||
return NS_ERROR_STORAGE_CONSTRAINT;
|
||||
}
|
||||
|
||||
// generic error
|
||||
|
|
Загрузка…
Ссылка в новой задаче