提交 bf9b0d4d 编写于 作者: E elcommie

Fix error handling for PCDLoader parsing #14776

上级 651c3cd8
......@@ -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.
先完成此消息的编辑!
想要评论请 注册