Sometimes I run into this situation that I have code duplication in a function and I cannot get rid of it. Have a look at this example. I repeat twice "return fail(500, ...)". A utility func will only return from itself. I need a construct that "returns in the parent". Try-catch is boilerplatey.
0 likes 1 replies
?