Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callback error #79

Open
172478394 opened this issue Dec 14, 2021 · 4 comments
Open

callback error #79

172478394 opened this issue Dec 14, 2021 · 4 comments
Labels

Comments

@172478394
Copy link

How can i get the error from callback function?

@aldulea
Copy link

aldulea commented Jan 24, 2022

Any updates here?

@CmderQ
Copy link

CmderQ commented Oct 2, 2022

Any updates here?

old version code :

type Callback func(*Event)

but the latest version

type Callback func(context.Context, *Event)

@rahulsawra98
Copy link

any updates on this?

@lin-credible
Copy link

lin-credible commented Aug 23, 2023

you can set err in callback func to event.Err and exit the func, than you can get the error in Event return

  • callback
event.Err =  err
  • fsm event returns
func (f *FSM) Event(ctx context.Context, event string, args ...interface{}) error

@172478394 @CmderQ @aldulea @rahulsawra98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants