add try-catch in js call webgl