Skip to content

Commit

Permalink
fix(fetcher): improve image loading error log
Browse files Browse the repository at this point in the history
Co-authored-by: Raphaël Duhen <[email protected]>
  • Loading branch information
jailln and HoloTheDrunk committed Dec 10, 2024
1 parent 683e55d commit dc347d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Provider/Fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ export default {
rej = reject;
});

textureLoader.load(url, res, () => {}, rej);
textureLoader.load(url, res, () => {}, (event) => {
const error = new Error(`Failed to load texture from URL: \`${url}\``);
error.originalEvent = event;
rej(error);
});
return promise;
},

Expand Down

0 comments on commit dc347d1

Please sign in to comment.