ClusterWS-Client-JS icon indicating copy to clipboard operation
ClusterWS-Client-JS copied to clipboard

Disable Log error

Open carmas123 opened this issue 6 years ago • 6 comments

Submitting

  • [ ] Bug
  • [X] Question
  • [ ] Suggetion
  • [ ] Other

Please can you add an option to disable the logging into console?

carmas123 avatar Jul 25 '18 17:07 carmas123

To be bale to disable errors to the console you will need to catch them with on('error', () => {}) and/or try, catch other vise it is standard of the browsers (not implemented in to the clusterws).

goriunov avatar Jul 25 '18 20:07 goriunov

I trace the log exception and I found that the message is created at: this.websocket = new Socket(this.options.url), this.websocket.binaryType = "arraybuffer",

This must be into a try {} catch {} to be able to handle the exception

carmas123 avatar Jul 26 '18 09:07 carmas123

Otherwise I got always a browser log

carmas123 avatar Jul 26 '18 09:07 carmas123

Ok i will have a look at that. Probably will improve error handling.

goriunov avatar Jul 27 '18 01:07 goriunov

Will go with version 4.0

goriunov avatar Oct 18 '18 10:10 goriunov

Very good news 👍

carmas123 avatar Oct 18 '18 11:10 carmas123