bluejava / zousan

A Lightning Fast, Yet Very Small Promise A+ Compliant Implementation
MIT License
127 stars 13 forks source link

Proposed fix for Issue #7 #12

Closed BITespresso closed 5 years ago

BITespresso commented 5 years ago

I'd like to propose this as fix for Issue https://github.com/bluejava/zousan/issues/7

It will add these changes:

watnab commented 5 years ago

Google Chrome 71.0.3578.98(Official Build)(Windows 10/64 bit)

Original Zousan(v2.3.3)

var o = new Zousan(function () { throw 123; }); results:

Uncaught 123 //highlighted as error

o results:

undefined

rejectWithErrorSuppression( 3098a55 )

var s = new Zousan(function () { throw 123; }); results:

undefined

s.catch(console.log), void 0 results:

123
undefined

Native Promise

var n = new Promise(function () { throw 123; }); results:

undefined
Uncaught (in promise) 123 //highlighted as error

n.catch(console.log), void 0 results:

123
undefined

BITespresso commented 5 years ago

@watnab Thanks for the summary!

See my thoughts in: https://github.com/bluejava/zousan/issues/7#issuecomment-449978770

BTW: Notice that Chrome Browser removes the

Uncaught (in promise) 123 //highlighted as error

once you execute n.catch(console.log), void 0.

watnab commented 5 years ago

BTW: Notice that Chrome Browser removes

Yes, the console output in Chrome may be something living.