I hadn't really solved logging perfectly and this function is here to deal with promises that may be rejected with something other than errors - eg https://github.com/cotag/libuv/blob/master/lib/libuv/tcp.rb#L83

Then some errors don't have a backtrace. I'm open to suggestions on what to do here. We return a rejection to continue rejecting down the promise chain - any other return value would resolve the promise chain