Bubble up InvalidStateErrors and log them
These may be indicative of a potentially fatal lack of disk space. // FREEBIE
This commit is contained in:
parent
83629df560
commit
e5b54d9b6a
3 changed files with 20 additions and 0 deletions
|
@ -562,7 +562,15 @@
|
|||
// Executes a given command on the driver. If not started, just stacks up one more element.
|
||||
execute: function (message) {
|
||||
if (this.started) {
|
||||
try {
|
||||
this.driver.execute(message[2].storeName || message[1].storeName, message[0], message[1], message[2]); // Upon messages, we execute the query
|
||||
} catch (e) {
|
||||
if (e.name === 'InvalidStateError') {
|
||||
var f = window.onInvalidStateError;
|
||||
if (f) f(e);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
} else if (this.failed) {
|
||||
message[2].error();
|
||||
} else {
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
;(function() {
|
||||
'use strict';
|
||||
window.onInvalidStateError = function(e) {
|
||||
console.log(e);
|
||||
};
|
||||
|
||||
console.log('background page reloaded');
|
||||
// register some chrome listeners
|
||||
if (chrome.notifications) {
|
||||
|
|
|
@ -21920,7 +21920,15 @@ return jQuery;
|
|||
// Executes a given command on the driver. If not started, just stacks up one more element.
|
||||
execute: function (message) {
|
||||
if (this.started) {
|
||||
try {
|
||||
this.driver.execute(message[2].storeName || message[1].storeName, message[0], message[1], message[2]); // Upon messages, we execute the query
|
||||
} catch (e) {
|
||||
if (e.name === 'InvalidStateError') {
|
||||
var f = window.onInvalidStateError;
|
||||
if (f) f(e);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
} else if (this.failed) {
|
||||
message[2].error();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue