createTaskWithTimeout: Don't log expiration if task threw (#1412)
FREEBIE
This commit is contained in:
@@ -51,7 +51,13 @@
|
||||
return reject(error);
|
||||
};
|
||||
|
||||
var promise = task();
|
||||
var promise;
|
||||
try {
|
||||
promise = task();
|
||||
} catch(error) {
|
||||
clearTimer();
|
||||
throw error;
|
||||
}
|
||||
if (!promise || !promise.then) {
|
||||
clearTimer();
|
||||
complete = true;
|
||||
|
Reference in New Issue
Block a user