| Index: Source/devtools/front_end/platform/utilities.js
|
| diff --git a/Source/devtools/front_end/platform/utilities.js b/Source/devtools/front_end/platform/utilities.js
|
| index ea7a2859cb598d0b6fa2459abf511deec6b4c29d..824b61b6004c2b63a1408cc63f628f38cd795154 100644
|
| --- a/Source/devtools/front_end/platform/utilities.js
|
| +++ b/Source/devtools/front_end/platform/utilities.js
|
| @@ -1483,3 +1483,15 @@ Promise.prototype.spread = function(callback)
|
| return callback.apply(null, arg);
|
| }
|
| }
|
| +
|
| +/**
|
| + * @param {T} defaultValue
|
| + * @return {!Promise.<T>}
|
| + * @template T
|
| + */
|
| +Promise.prototype.catchException = function(defaultValue) {
|
| + return this.catch(function (error) {
|
| + console.error(error);
|
| + return defaultValue;
|
| + });
|
| +}
|
|
|