FrontPanel Platform API - v6.1.0
    Preparing search index...

    Function isFrontPanelError

    • Type guard for FrontPanelError: narrows a caught value to a rejected FrontPanel operation carrying an ErrorCode on errorCode. Prefer this over instanceof when handling errors from FrontPanel operations.

      Parameters

      • error: unknown

      Returns error is FrontPanelError

      try {
      await device.getFPGAConfiguration().loadFromFile(bitfile);
      } catch (error) {
      if (isFrontPanelError(error) && error.errorCode === ErrorCode.Timeout) {
      // retry logic
      }
      }