Skip to content

fix: correct misleading error message#137

Open
rhkrwngud445 wants to merge 1 commit intoLexiLabs-App:v1.1.1from
rhkrwngud445:fix/correct_misleading_error_message
Open

fix: correct misleading error message#137
rhkrwngud445 wants to merge 1 commit intoLexiLabs-App:v1.1.1from
rhkrwngud445:fix/correct_misleading_error_message

Conversation

@rhkrwngud445
Copy link
Copy Markdown

@rhkrwngud445 rhkrwngud445 commented Mar 15, 2026

Overview

This PR improves the clarity of error messages across the library's ad handlers. The goal is to provide developers with precise, actionable guidance when they encounter runtime exceptions related to uninitialized or unloaded ad states.

Context

As identified in our contribution plan, current error messages occasionally blend the names of the UI Composables (e.g., RewardedAd) with their corresponding Logic Handlers (e.g., RewardedAdHandler). Since the load() and setListeners() methods reside on handler instances rather than the Composable functions, this update ensures developers are directed to the correct object for resolution.

Key Changes

  • Actionable Guidance: Updated error strings to explicitly mention the handler instance and provide clear usage examples (e.g., rewardedAdHandler.load()).
  • Improved Accuracy: Corrected naming inconsistencies in RewardedInterstitialAdHandler where error messages previously referred to it as a generic RewardedAd.
  • Platform Consistency: Standardized these improvements across both Android and iOS source sets for a unified KMP developer experience.

Affected Components

  • Handlers: RewardedInterstitialAdHandler, InterstitialAdHandler, RewardedAdHandler, NativeAdHandler
  • Platforms: Android and iOS

Impact

These changes eliminate ambiguity during the debugging process, allowing developers to quickly resolve state-related issues by following the intuitive instructions provided directly within the exception messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant