message: fix: catch errors from zwave driver contructor
diff: @@ -1296,26 +1296,30 @@ ZwaveClient.prototype.connect = async function () {
  networkKey = undefined
  }
  + try {
  // init driver here because if connect fails the driver is destroyed
  + // this could throw so include in the try/catch
  this.driver = new Driver(this.cfg.port, {
  cacheDir: storeDir,
  networkKey: networkKey
  })
  +
  this.driver.on('error', driverError.bind(this))
  this.driver.once('driver ready', driverReady.bind(this))
  this.driver.on('all nodes ready', scanComplete.bind(this))
  debug('Connecting to', this.cfg.port)
  - try {
  await this.driver.start()
  this.status = ZWAVE_STATUS.connected
  this.connected = true
  } catch (error) {
  // destroy diver instance when it fails
  + if (this.driver) {
  this.driver.destroy().catch(err => {
  debug('Error while destroing driver ' + err.message)
  })
  + }
  driverError.call(this, error)
  debug('Retry connection in 3 seconds...')
  this.reconnectTimeout = setTimeout(this.connect.bind(this), 3000)
  