Bug 696483 - Improve error handling. r=mak. a=Ms2ger.

Add an if to avoid a common case and reportError if something else happens.

--HG--
extra : rebase_source : 7a5952e8ba8e5f14d7b7a667d945d754051f9f05
This commit is contained in:
Rafael Ávila de Espíndola 2011-12-14 11:22:03 -05:00
parent 0b84a96de6
commit 2e455e4111

View File

@ -894,9 +894,14 @@ FormHistory.prototype = {
this._dbFinalize();
// Close the connection, ignore 'already closed' error
// FIXME (bug 696483): we should reportError in here.
try { this.dbConnection.close(); } catch(e) {}
if (this.dbConnection !== undefined) {
try {
this.dbConnection.close();
} catch (e) {
Components.utils.reportError(e);
}
}
this.dbFile.remove(false);
}
};