Browse Source

revert removal of try - catch

Lewy Blue 6 years ago
parent
commit
541ad28924
1 changed files with 15 additions and 3 deletions
  1. 15 3
      examples/js/loaders/FBXLoader.js

+ 15 - 3
examples/js/loaders/FBXLoader.js

@@ -48,7 +48,21 @@ THREE.FBXLoader = ( function () {
 
 			loader.load( url, function ( buffer ) {
 
-				onLoad( self.parse( buffer, path ) );
+				try {
+
+					onLoad( self.parse( buffer, path ) );
+
+				} catch ( error ) {
+
+					setTimeout( function () {
+
+						if ( onError ) onError( error );
+
+						self.manager.itemError( url );
+
+					}, 0 );
+
+				}
 
 			}, onProgress, onError );
 
@@ -301,8 +315,6 @@ THREE.FBXLoader = ( function () {
 
 			}
 
-			console.log();
-
 			if ( typeof content === 'string' ) { // ASCII format
 
 				return 'data:' + type + ';base64,' + content;