未验证 提交 cbe8e563 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #14796 from elcommie/handle-pcd-parse-errors

Fix error handling for PCDLoader parsing
......@@ -28,7 +28,23 @@ THREE.PCDLoader.prototype = {
loader.setResponseType( 'arraybuffer' );
loader.load( url, function ( data ) {
onLoad( scope.parse( data, url ) );
try {
onLoad( scope.parse( data, url ) );
} catch ( e ) {
if ( onError ) {
onError( e );
} else {
throw e;
}
}
}, onProgress, onError );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册