enhanced exception handling to catch exceptions thrown by promises being returned within a then(). also finally split out the resolver/rejector wrapping to a separate function, with many comments to help explain the somewhat confusing logic.
enhanced exception handling to catch exceptions thrown by promises being returned within a then(). also finally split out the resolver/rejector wrapping to a separate function, with many comments to help explain the somewhat confusing logic.

philraj/promises-from-scratch