Loading asset with same name, why is error thrown instead of invoking onError callback
See original GitHub issueMore of a question of intension or not and maybe an explanation of why.
When loading an asset twice with the same name the Loader.add method throws an error.
Expected Behavior
When loading an asset twice with the same name, the Loader.onError callback will be invoked
Current Behavior
When loading an asset twice with the same name the Loader.add method throws an error.
Possible Solution
Catch the error and invoke the onError callback
Steps to Reproduce
load an asset with the same name twice and note you cannot catch the error with the onError callback method.
Environment
N/A
pixi.js
version: 5.3.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Loading asset with same name, why is error thrown instead of ...
load an asset with the same name twice and note you cannot catch the error with the onError callback method. Environment. N/A. pixi.js...
Read more >flutter - why am I getting an error when calling my image asset ...
You must have and asset called exactly like the name you're printing in your Text. Check into de folder "assets/images/" for that names....
Read more >How to Solve the Chunk Load Error in JavaScript - Rollbar
Whenever there's an error observed in dynamically fetching helper JavaScript files known as Chunks, a ChunkLoad Error is thrown.
Read more >A Comprehensive Guide To Error Handling In Node.js
You can also throw it, which causes the Error object to become an exception. Once you throw an error, it bubbles up the...
Read more >Advanced | Understand.io
In JavaScript you can throw any type of data that you'd like: ... the details of the error are not reported (to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Loader holds on to resources after they have been loaded(in addition to the texture caches). Is okay to reset after you’re done loading to remove those references and load more.
I see, the
_loader
instance I’m using is the one that comes from new Application().loader. Is that still intended? That one should use reset afterward? Are the previous textures in that main loader instance then stored in the TextureCache?