syrusakbary / promise

Ultra-performant Promise implementation in Python
MIT License
362 stars 76 forks source link

TypeError: unbound method reject() must be called with Promise instance as first argument #2

Closed cmeadows closed 8 years ago

cmeadows commented 8 years ago

I have tried the following:

except Exception, e: return Promise.reject(e)

return Promise.reject(Exception(e))

Both return the following error:

TypeError: unbound method reject() must be called with Promise instance as first argument (got Exception instance instead)

syrusakbary commented 8 years ago

You should use Promise.rejected instead 😉 Closing issue