mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
validate path argument
This commit is contained in:
parent
82b6b95212
commit
00f80130c4
1 changed files with 3 additions and 0 deletions
|
|
@ -68,6 +68,9 @@ function SerialPort(path, options) {
|
|||
if (FLOWCONTROL.indexOf(options.flowcontrol) == -1) {
|
||||
throw new Error('Invalid "flowcontrol": ' + options.flowcontrol);
|
||||
}
|
||||
if (!path) {
|
||||
throw new Error('Invalid port specified: ' + path);
|
||||
}
|
||||
|
||||
stream.Stream.call(this);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue