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

Add addChainErrorHandler method. #1

Closed
inamiy opened this issue Aug 11, 2014 · 0 comments
Closed

Add addChainErrorHandler method. #1

inamiy opened this issue Aug 11, 2014 · 0 comments
Assignees

Comments

@inamiy
Copy link
Member

inamiy commented Aug 11, 2014

Psudocode

machine.addRoute(nil=>nil) // connect all states
machine.addRouteChain(1=>2=>3) { ctx in println("SUCCEEDED") }
machine.addChainErrorHandler(1=>2=>3) { ctx in println("FAILED") }

// current state = 0
machine <- 1 // start chaining
machine <- 3 // chaining failed (println FAILED)
machine <- 2 // already failed (no println)
machine <- 1 // reset & start chaining again
machine <- 2 // succeeding...
machine <- 3 // chaining succeeded (println SUCCEEDED)
@inamiy inamiy self-assigned this Aug 11, 2014
@inamiy inamiy changed the title Add addErrorChainHandler method. Add addChainErrorHandler method. Aug 11, 2014
@inamiy inamiy closed this as completed in e031f8a Aug 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant