Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Determine how we want to handle errors / control flow with Conductors #2

Open
knewter opened this issue Mar 20, 2013 · 0 comments
Open

Comments

@knewter
Copy link
Member

knewter commented Mar 20, 2013

https://gist.github.com/knewter/5201992

So my suggestion is that we use the second/third style (since Promises in the style I mocked in the first don't exist yet lol) and our Conductors expect to call success/fail appropriately with an Error object that we expect/understand. @parndt thoughts here? I have used callbacks before in controllers in a rails app and was happy (just feels objecty to not be saying "do something, then tell me how you did on it, then I'll do other stuff in response" and instead say "do this thing, and here's how you handle these optional cases".

One benefit there is that the Conductor could optionally do NEITHER of those things, at his prerogative. So you "Tell, Don't Ask" and it's up to the Conductor to do what he wishes. He's in charge. But you can give him good ideas.

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

No branches or pull requests

1 participant