PCDLoader does not handle errors correctly
See original GitHub issueDescription of the problem
The PCDLoader doesn’t handle errors well. If there’s an error when parsing, the error handler passed in is not called and the resulting exception is only caught by a global process handler. This may apply to all loaders as if there’s an error in the setTimeout
method used for loading there’s no way to catch that exception.
var url = 'https://threejs.org/examples/textures/sprites/disc.png';
var loader = new THREE.PCDLoader().load(
url,
() => alert('something loaded'),
() => {},
() => alert('error handler - never gets called')
);
Three.js version
- r91
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
any
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Unable to load a pcd file using a get request from node server ...
Inside the javascript code using pcd loader tried to load the point cloud inside the scene. var loader = new THREE.PCDLoader() // load...
Read more >A Definitive Guide to Handling Errors in JavaScript - Kinsta
Getting tripped up by errors in your JavaScript? We'll show you how to tame those errors so you can get back to developing...
Read more >PCDLoader – three.js docs
PCDLoader. A loader for the PCD (Point Cloud Data) file format. PCDLoader supports ASCII and (compressed) binary files as well as the following...
Read more >Error Handling - loaders.gl
Applications typically want to provide solid error handling when loading and ... At the moment loaders.gl does not provide any error formatting plugins, ......
Read more >Changelog for package hrpsys - ROS Documentation
... Add KalmanFilterParam as struct; Better error handling ... controller does not work due to some fault of input. d3a7750 (rtc/PCDLoader) ...
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
Sure. Why not? I’ll get something up later today
Maybe something like this would help to improve error handling:
The
onError()
callback ofPCDLoader.load()
would now be able to handle exceptions caused by an invalid format.