bluetooth-serial-port 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -221,7 +221,7 @@ Check whether the connection is open or not.
221
221
  Writes a [Buffer](http://nodejs.org/api/buffer.html) to the serial port connection.
222
222
 
223
223
  - buffer - the [Buffer](http://nodejs.org/api/buffer.html) to be written.
224
- - callback(err, bytesWritten) - is called when the write action has been completed. When the `err` parameter is set an error has occured, in that case `err` is an [Error object](http://docs.nodejitsu.com/articles/errors/what-is-the-error-object). When `err` is not set the write action was successful and `bytesWritten` contains the amount of bytes that is written to the connection.
224
+ - callback(err, bytesWritten) - is called when the write action has been completed. When the `err` parameter is set an error has occurred, in that case `err` is an [Error object](http://docs.nodejitsu.com/articles/errors/what-is-the-error-object). When `err` is not set the write action was successful and `bytesWritten` contains the amount of bytes that is written to the connection.
225
225
 
226
226
  #### BluetoothSerialPort.listPairedDevices(callback)
227
227
 
@@ -284,7 +284,7 @@ Emitted when the server is closed (i.e. from calling `close` or as the result of
284
284
 
285
285
  Emitted when reading from the serial port connection results in an error. The connection is closed.
286
286
 
287
- - err - an [Error object](http://docs.nodejitsu.com/articles/errors/what-is-the-error-object) describing the failure.
287
+ * `err` - an [Error object](http://docs.nodejitsu.com/articles/errors/what-is-the-error-object) describing the failure.
288
288
 
289
289
  ## Typescript support
290
290
 
@@ -296,7 +296,7 @@ import * as btSerial from "bluetooth-serial-port";
296
296
  btSerial.findSerialPortChannel(address: string, (channel: number) => {
297
297
  btSerial.connect(address: string, channel: number, () => {
298
298
  btSerial.write(Buffer.from("yes"), (err) => {
299
- if (err) {
299
+ if (err) {
300
300
  console.error(err);
301
301
  }
302
302
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluetooth-serial-port",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "description": "Bluetooth serial port communication for Node.js",
5
5
  "author": "Eelco Cramer <eelco@hailendal.org>",
6
6
  "keywords": [
@@ -652,7 +652,7 @@ BTSerialPortBindingServer::ClientWorker::~ClientWorker()
652
652
 
653
653
  void BTSerialPortBindingServer::ClientWorker::Execute(){
654
654
  if(mBaton == nullptr){
655
- return Nan::ThrowError("listen_baton_t is null!");
655
+ return SetErrorMessage("listen_baton_t is null!");
656
656
  }
657
657
 
658
658
  struct sockaddr_rc clientAddress = {
@@ -677,7 +677,7 @@ void BTSerialPortBindingServer::ClientWorker::Execute(){
677
677
  break;
678
678
  }
679
679
  else if (select_status == -1) {
680
- return Nan::ThrowError("error pselect'ing socket!");
680
+ return SetErrorMessage("error pselect'ing socket!");
681
681
  }
682
682
  }
683
683