browser-serialport
browser-serialport copied to clipboard
align with with node-serialport errors
https://github.com/garrows/browser-serialport/blob/master/index.js#L190 need https://github.com/voodootikigod/node-serialport/issues/440
Until we get tests done, fixed the one string in https://github.com/garrows/browser-serialport/tree/returnerrors
Somewhat related, are we happy returning chrome.runtime.lastError. Is it actually an error object, or should we wrap it?
I tried some stuff in an extension but couldnt really verify..
typeof is object but both of these throw "TypeError: Expecting a function in instanceof check, but got Error" console.log(chrome.runtime.lastError instanceof Error) console.log(Error.prototype.isPrototypeOf(chrome.runtime.lastError)
Chrome errors should be actual error objects. There was 1 more string that should have been an error. Let me find it.
found and fixed in https://github.com/garrows/browser-serialport/commit/40bb717d5fe6fe7057e97c4baa82a4db52198191
error strings removed. updating title
We throw a bunch more errors in our master branch right now (primarily around opening and closing ports). Just a heads up.