You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now options errors when creating a serialport happen in a callback that is called immediately if provided to the constructor or emitted on the factory object. Lets throw these errors immediately.
We won't need the factory after this which things even further.
I suggest we return the constructor, but keep a copy of it on a SerialPort property as to not confuse too many people with this change. (eg, most example code on the net will continue to work) which we can depreciate later. list and parsers will also need to be properties of the constructor function too.
The text was updated successfully, but these errors were encountered:
reconbot
changed the title
Throw option errors during construction instead of passing them in a callback
Throw argument errors during construction instead of passing them in a callback
May 26, 2016
Right now options errors when creating a serialport happen in a callback that is called immediately if provided to the constructor or emitted on the factory object. Lets throw these errors immediately.
We won't need the factory after this which things even further.
I suggest we return the constructor, but keep a copy of it on a
SerialPort
property as to not confuse too many people with this change. (eg, most example code on the net will continue to work) which we can depreciate later.list
andparsers
will also need to be properties of the constructor function too.The text was updated successfully, but these errors were encountered: