kovenant icon indicating copy to clipboard operation
kovenant copied to clipboard

Using deferred promise in middle of chain..

Open scottandrew opened this issue 5 years ago • 0 comments

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.

scottandrew avatar Jan 08 '19 16:01 scottandrew