bananajuicellc / first.bananajuice.tech

A selection game to help gamers pick who goes first.
https://whogoes1st.com
Mozilla Public License 2.0
1 stars 3 forks source link

Add stack trace to promises output. #33

Closed tswast closed 8 years ago

tswast commented 8 years ago

This makes it much easier to debug when there are problems.

Before:

index.js:21 Failed to load the deck. TypeError: Cannot read property 'keys' of undefined(…)

After:

index.js:21 Failed to load the deck.
TypeError: Cannot read property 'keys' of undefined(…)
TypeError: Cannot read property 'keys' of undefined
     at wgf.getDeck
     (http://localhost:8080/static/js/wgf.js:73:28)(anonymous function)
     @ index.js:21

Corresponding GIF (not a selfie this time):

Can I peek into this error message?

(Peeking into an error to see more information.)

Fixes #32