mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1111284 - Improve error messages of Sqlite.jsm by including specific error message. r=Yoric
This commit is contained in:
parent
d08b318c3c
commit
ec58d2a226
@ -682,7 +682,7 @@ ConnectionData.prototype = Object.freeze({
|
||||
break;
|
||||
|
||||
case Ci.mozIStorageStatementCallback.REASON_ERROR:
|
||||
let error = new Error("Error(s) encountered during statement execution.");
|
||||
let error = new Error("Error(s) encountered during statement execution: " + [error.message for (error of errors)].join(", "));
|
||||
error.errors = errors;
|
||||
deferred.reject(error);
|
||||
break;
|
||||
|
@ -933,10 +933,9 @@ add_task(function* test_readOnly_clone() {
|
||||
// Just check that it works.
|
||||
yield clone.execute("SELECT 1");
|
||||
// But should not be able to write.
|
||||
try {
|
||||
yield clone.execute("CREATE TABLE test (id INTEGER PRIMARY KEY)");
|
||||
do_throw(new Error("Should not be able to write to a read-only clone."));
|
||||
} catch (ex) {}
|
||||
|
||||
yield Assert.rejects(clone.execute("CREATE TABLE test (id INTEGER PRIMARY KEY)"),
|
||||
/readonly/);
|
||||
// Closing order should not matter.
|
||||
yield c.close();
|
||||
yield clone.close();
|
||||
|
Loading…
Reference in New Issue
Block a user