pamoja for TypeScript - v0.2.0
    Preparing search index...

    Function isDeviceError

    • Reports whether a thrown value is an end device's error, and optionally which one.

      Parameters

      • error: unknown

        What was caught.

      • Optionalcode: lorawan.DeviceErrorCode

        The code to match, or any when omitted.

      Returns error is lorawan.DeviceError

      Whether it is that error.

      try {
      device.send(2, reading, nowUs)
      } catch (error) {
      if (isDeviceError(error, 'Wait')) sleepUntil(error.untilUs)
      else throw error
      }