looplab / fsm

Finite State Machine for Go
Apache License 2.0
2.86k stars 312 forks source link

callback error #79

Open 172478394 opened 2 years ago

172478394 commented 2 years ago

How can i get the error from callback function?

aldulea commented 2 years ago

Any updates here?

CmderQ commented 2 years ago

Any updates here?

old version code :

type Callback func(*Event)

but the latest version

type Callback func(context.Context, *Event)

rahulsawra98 commented 1 year ago

any updates on this?

lin-credible commented 1 year ago

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

@172478394 @CmderQ @aldulea @rahulsawra98