Skip to content

[AsyncNotifier] How to set AsyncError in custom state? #3361

Answered by noriHanda
phamquoctrongnta asked this question in Q&A
Discussion options

You must be logged in to vote

@phamquoctrongnta Your English is good. English is not my first language either so we are on the same side :)
What I was trying to tell you was that throwing Exception was a valid way of returning details of error. throw is more suitable than return for exceptions because IDE can jump to where exception has occurred, which means it's more developer friendly. If you just return Exception as you mention, you need to handle manually inside build method of Notifier and it gets harder to track where the Exception originates from.

Replies: 2 comments 26 replies

Comment options

You must be logged in to vote
25 replies
@phamquoctrongnta
Comment options

@noriHanda
Comment options

@phamquoctrongnta
Comment options

@noriHanda
Comment options

Answer selected by phamquoctrongnta
@phamquoctrongnta
Comment options

@phamquoctrongnta
Comment options

@noriHanda
Comment options

@phamquoctrongnta
Comment options

Comment options

You must be logged in to vote
1 reply
@phamquoctrongnta
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants