From 89db44bc6af242d52f4da7bb86011999533c1116 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Fri, 23 Aug 2019 17:28:13 -0400 Subject: [PATCH 1/3] Give some indication of why asset load failed --- src/import/load-costume.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/import/load-costume.js b/src/import/load-costume.js index a8da72a48..c2195ee91 100644 --- a/src/import/load-costume.js +++ b/src/import/load-costume.js @@ -171,7 +171,8 @@ const fetchBitmapCanvas_ = function (costume, runtime, rotationCenter) { assetMatchesBase: scale === 1 && !textImageElement }; }) - .catch(() => { + .catch(error => { + log.warn(e.name, ': ',e.message); // Clean up the text layer properties if it fails to load delete costume.textLayerMD5; delete costume.textLayerAsset; From d3f687a6a70e94be60438d5d76243dc8271a5fbb Mon Sep 17 00:00:00 2001 From: DD Liu Date: Fri, 23 Aug 2019 17:31:11 -0400 Subject: [PATCH 2/3] use template --- src/import/load-costume.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/import/load-costume.js b/src/import/load-costume.js index c2195ee91..55cb292ee 100644 --- a/src/import/load-costume.js +++ b/src/import/load-costume.js @@ -172,7 +172,7 @@ const fetchBitmapCanvas_ = function (costume, runtime, rotationCenter) { }; }) .catch(error => { - log.warn(e.name, ': ',e.message); + log.warn(`${e.name}: ${e.message}`); // Clean up the text layer properties if it fails to load delete costume.textLayerMD5; delete costume.textLayerAsset; From e447f003a1268e37ccfb73df618f92dbea129418 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Wed, 4 Sep 2019 11:26:23 -0400 Subject: [PATCH 3/3] Fix variable name --- src/import/load-costume.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/import/load-costume.js b/src/import/load-costume.js index 55cb292ee..31639f404 100644 --- a/src/import/load-costume.js +++ b/src/import/load-costume.js @@ -172,7 +172,7 @@ const fetchBitmapCanvas_ = function (costume, runtime, rotationCenter) { }; }) .catch(error => { - log.warn(`${e.name}: ${e.message}`); + log.warn(`${error.name}: ${error.message}`); // Clean up the text layer properties if it fails to load delete costume.textLayerMD5; delete costume.textLayerAsset;