CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.71k stars 307 forks source link

Return Promise.reject instead of throwing error #72

Closed lilleyse closed 7 years ago

lilleyse commented 7 years ago

For #71

This is for proper error reporting when --bypassPipeline and -b are both set, which isn't allowed right now.

I don't think this counts as incorrect usage of the library, so I'm rejecting the promise instead of throwing an error. Otherwise the error is not caught in bin/obj2gltf.js.

If this should still be a DeveloperError, I can wrap the obj2gltf call in bin/obj2gltf.js in a try-catch.

emackey commented 7 years ago

Looks good to me.