Skip to content

Refactor: Replace panic! calls with Result types - #434

Merged
JerryIdoko merged 2 commits into
SoroSusu-Protocol:mainfrom
frankosakwe:refactor/panic-to-result
Apr 30, 2026
Merged

JerryIdoko merged 2 commits into
SoroSusu-Protocol:mainfrom
frankosakwe:refactor/panic-to-result

Conversation

@frankosakwe

Copy link
Copy Markdown
  • Add comprehensive error types in errors.rs
  • Update core functions to return SoroSusuResult
  • Refactor create_circle, join_circle, deposit, distribute_payout, trigger_payout, finalize_round
  • Replace panic! calls with proper error handling using ? operator
  • Update trait function signatures to match new Result types
  • Establish consistent error handling pattern across the codebase

Remaining work: ~50+ panic! calls still need refactoring in other functions

- Add comprehensive error types in errors.rs
- Update core functions to return SoroSusuResult<T>
- Refactor create_circle, join_circle, deposit, distribute_payout, trigger_payout, finalize_round
- Replace panic! calls with proper error handling using ? operator
- Update trait function signatures to match new Result types
- Establish consistent error handling pattern across the codebase

Remaining work: ~50+ panic! calls still need refactoring in other functions
@frankosakwe

Copy link
Copy Markdown
Author

close#388

@JerryIdoko

Copy link
Copy Markdown
Contributor

resolve conflicts

@JerryIdoko
JerryIdoko merged commit 2546450 into SoroSusu-Protocol:main Apr 30, 2026
1 check failed
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.

2 participants