| Index: ui/file_manager/file_manager/common/js/importer_common.js
|
| diff --git a/ui/file_manager/file_manager/common/js/importer_common.js b/ui/file_manager/file_manager/common/js/importer_common.js
|
| index c03b8237506b776c94dcfa996edae7f8ee4dfbdf..8e9cd7252137c7bf990a72755a41e773c56e4c9f 100644
|
| --- a/ui/file_manager/file_manager/common/js/importer_common.js
|
| +++ b/ui/file_manager/file_manager/common/js/importer_common.js
|
| @@ -756,23 +756,21 @@ importer.RuntimeLogger.prototype.error = function(content) {
|
| /** @override */
|
| importer.RuntimeLogger.prototype.catcher = function(context) {
|
| var prefix = '(' + context + ') ';
|
| +
|
| return function(error) {
|
| this.reportErrorContext_(context);
|
|
|
| var message = prefix + 'Caught error in promise chain.';
|
| + // Append error info, if provided, then output the error.
|
| if (error) {
|
| - // Error can be anything...maybe an Error, maybe a string.
|
| - var error = error.message || error;
|
| - this.error(message + ' Error: ' + error);
|
| - if (error.stack) {
|
| - this.write_('STACK', prefix + error.stack);
|
| - }
|
| - } else {
|
| - this.error(message);
|
| - error = new Error(message);
|
| + message += ' Error: ' + error.message || error;
|
| }
|
| + this.error(message);
|
|
|
| - throw error;
|
| + // Output a stack, if provided.
|
| + if (error && error.stack) {
|
| + this.write_('STACK', prefix + error.stack);
|
| + }
|
| }.bind(this);
|
| };
|
|
|
|
|