Closed stewe closed 4 years ago
It seems VRMLLoader
is not the only loader which does not use try/catch around the invocation of parse()
. It might be worth to check all loaders and change the code according to GLTFLoader
.
I think loaders should use try/catch. It's annoying when it bubbles up to the Editor's Loader.js
.
The code should actually look like so since onError()
is no mandatory callback function. It's also useful to tell the loading manager that an error occured.
try {
onLoad( scope.parse( text, path ) );
} catch ( e ) {
if ( onError ) {
onError( e );
} else {
console.error( e );
}
scope.manager.itemError( url );
}
Looks good to me!
Okay, I've added today a PR with the fix.
Description of the problem
When an error occurs while parsing the loaded VRML file, the VRMLLoader does not handle it.
It should call onError instead.
Three.js version
Browser
OS