Skip to content

Comments

v1.9.26 - Fix - Initializable: improve error handling#141

Merged
gmpassos merged 1 commit intomasterfrom
fix/initializable-improve-error-handling
Feb 3, 2026
Merged

v1.9.26 - Fix - Initializable: improve error handling#141
gmpassos merged 1 commit intomasterfrom
fix/initializable-improve-error-handling

Conversation

@gmpassos
Copy link
Contributor

@gmpassos gmpassos commented Feb 3, 2026

  • Initializable mixin:
    • ensureInitialized: added onError handler to then call to route errors to _onInitializationError.
    • executeInitializedCallback:
      • Added onError handler to then call on async initialization result to throw InitializationError with stack trace.
    • _FutureExtension:
      • toCompleter: added onError handler to then to complete completer with error and stack trace if not completed.

- `Initializable` mixin:
  - `ensureInitialized`: added `onError` handler to `then` call to route errors to `_onInitializationError`.
  - `executeInitializedCallback`:
    - Added `onError` handler to `then` call on async initialization result to throw `InitializationError` with stack trace.
  - `_FutureExtension`:
    - `toCompleter`: added `onError` handler to `then` to complete completer with error and stack trace if not completed.
@gmpassos gmpassos changed the title v1.9.26 v1.9.26 - Fix: Initializable: improve error handling Feb 3, 2026
@gmpassos gmpassos changed the title v1.9.26 - Fix: Initializable: improve error handling v1.9.26 - Fix - Initializable: improve error handling Feb 3, 2026
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.45%. Comparing base (5b7c470) to head (1315a68).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/bones_api_initializable.dart 50.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #141      +/-   ##
==========================================
+ Coverage   65.35%   65.45%   +0.09%     
==========================================
  Files          62       62              
  Lines       21164    21173       +9     
==========================================
+ Hits        13831    13858      +27     
+ Misses       7333     7315      -18     
Flag Coverage Δ
unittests 65.45% <50.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmpassos gmpassos merged commit 7672b53 into master Feb 3, 2026
4 of 5 checks passed
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