justadudewhohacks / face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
MIT License
16.53k stars 3.69k forks source link

Catch internal error in promise. #342

Open idelburgo opened 5 years ago

idelburgo commented 5 years ago

Hi,

I get this error in when calling the promise to detect face + landmarks. Is there any possibility to catch it? Im trying to get the error through then/catch but not reaching this code.

Fragment shader compilation failed. and Uncaught (in promise) Error: Failed to compile fragment shader.

justadudewhohacks commented 5 years ago

I think being able to catch this error would require some solution similar to what is described here: https://github.com/tensorflow/tfjs/issues/756.

Did you try to wrap the failing code into a simple try/catch? Does it not work?

idelburgo commented 5 years ago

Yes, I tried, but there is not error Throwed just printed and continue, so it keeps giving errors... :(