Skip to content

Commit

Permalink
validate path argument
Browse files Browse the repository at this point in the history
  • Loading branch information
joeferner committed Jul 24, 2012
1 parent 82b6b95 commit 00f8013
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions serialport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 00f8013

Please sign in to comment.