mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Better error handling
This commit is contained in:
parent
004f38190a
commit
1c74c9028c
1 changed files with 5 additions and 2 deletions
|
@ -39,7 +39,7 @@ const loadBitmap_ = function (costume, costumeAsset, runtime, rotationCenter) {
|
|||
const onError = function () {
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
removeEventListeners();
|
||||
reject();
|
||||
reject('Image load failed');
|
||||
};
|
||||
const onLoad = function () {
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
|
@ -166,7 +166,10 @@ const loadCostume = function (md5ext, costume, runtime, optVersion) {
|
|||
return runtime.storage.load(assetType, md5, ext).then(costumeAsset => {
|
||||
costume.dataFormat = ext;
|
||||
return loadCostumeFromAsset(costume, costumeAsset, runtime, optVersion);
|
||||
});
|
||||
})
|
||||
.catch(e => {
|
||||
log.error(e);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Reference in a new issue