private static String getUndocumentedScanThrottleErrorMessage(final Activity context, final Date retryDate) {
        final StringBuilder stringBuilder =
                new StringBuilder(context.getString(R.string.error_undocumented_scan_throttle));

        if (retryDate != null) {
            final String retryText = String.format(
                    Locale.getDefault(),
                    context.getString(R.string.error_undocumented_scan_throttle_retry),
                    secondsTill(retryDate)
            );
            stringBuilder.append(retryText);
        }

        return stringBuilder.toString();
    }
Show toast with error message appropriate to exception reason.

@param context   current Activity context
@param exception BleScanException to show error message for
sample/src/main/java/com/polidea/rxandroidble2/sample/util/ScanExceptionHandler.java