kovenant
kovenant copied to clipboard
Using deferred promise in middle of chain..
How can you use a deferred promise int he middle of a chain? The only way I can see doing it right now is.
task { setup1() } then { setup2() } then { deffered() } then { promise -> val result = promise ?: throw(error) if result.isError() { throw(error) } else { it.get() } } fail { }
Unwrap doesn't seem to exist like is suggested.