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

Add an if to avoid a common case and reportError if something else happens.
This commit is contained in:
Rafael Ávila de Espíndola
2011-12-14 11:22:03 -05:00
parent f971a6d147
commit ab19420966

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);
}
};