VRMLLoader does no error forwarding calling the parser
See original GitHub issueDescription of the problem
When an error occurs while parsing the loaded VRML file, the VRMLLoader does not handle it.
load: function ( url, onLoad, onProgress, onError ) {
var scope = this;
var path = ( scope.path === '' ) ? LoaderUtils.extractUrlBase( url ) : scope.path;
var loader = new FileLoader( this.manager );
loader.setPath( scope.path );
loader.load( url, function ( text ) {
onLoad( scope.parse( text, path ) );
}, onProgress, onError );
},
It should call onError instead.
load: function ( url, onLoad, onProgress, onError ) {
var scope = this;
var path = ( scope.path === '' ) ? LoaderUtils.extractUrlBase( url ) : scope.path;
var loader = new FileLoader( this.manager );
loader.setPath( scope.path );
loader.load( url, function ( text ) {
try {
const parsed = scope.parse( text, path )
onLoad(parsed);
} catch (e) {
onError(e)
}
}, onProgress, onError );
},
Three.js version
- r116
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
VRMLLoader from three.js error on Angular 6 project
Cannot set property 'undefined' of undefined" at VRMLLoader.parse() method. In my component I have the following code: import { VRMLLoader } ...
Read more >VRMLLoader unable to load a VRML - Questions - three.js forum
I was trying to load a VRML loader through script but getting an error : Uncaught TypeError: THREE.VRMLLoader is not a constructor at...
Read more >2005-January.txt - Kitware
The problem is when I want to run a minimal java example, by importing the jar ... using the standard VRML loader and...
Read more >(PDF) A Collaborative Environment for Protein Visualization
We have developed a framework of distributed visualization and collaboration to help biochemistry and genomics researchers in understanding ...
Read more >AVRA An Architecture for VR-Based Applications - uO Research
tightly hard coded within an architecture that does not welcome changes. ... their PPU is called NovodeX which is used by their Megon...
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
Okay, I’ve added today a PR with the fix.
I think loaders should use try/catch. It’s annoying when it bubbles up to the Editor’s
Loader.js
.