MyScriptJS icon indicating copy to clipboard operation
MyScriptJS copied to clipboard

Questions about some errors that cannot be caught

Open Lizirui opened this issue 7 years ago • 1 comments

I am listening for an ‘error’ event to catch an error. ( vue App ) this.$refs.editor.addEventListener('error', (evt: any) => { console.log(evt, "evt") }); But there are some errors of type="error" that are not captured, such as message:"Session is too old. Max Session Duration Reached" type:"error" I want to be able to catch all the type="error" errors to do some processing. help

Lizirui avatar Oct 19 '18 07:10 Lizirui

Hello,

I made a quick test and was able to capture the event using in the console:

const ed = document.getElementById('editor');
ed.addEventListener('error',(e) => {console.log(e.detail);});

Are you sure there is nothing that prevent the event to reach your component ?

Anyway, if you want to prevent this event from happening you might want to use recognitionParams.v4.alwaysConnected = true.

Regards

benfonty avatar Oct 22 '18 07:10 benfonty