Please take a look at this code example
I provide an invalid url and the onError_mtlLoader callback is triggered as expected.
In the onError_mtlLoader callback, I throw an error and expect the catch block to intercept the throw, but it doesn’t.
In the console I see the following messages:
MTLLoader failed to load
MTLLoader.js:88 Uncaught Error: MTLLoader failed to load
at Object.onError_mtlLoader [as onError] (MTLLoader.js:88)
at XMLHttpRequest. (three.module.js:35715)
How can I intercept the throw from the onError_mtlLoader in the program that called MTLLoader.load ?