Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove stack traces for port errors #770
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
process-bot
Dec 3, 2016
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Dec 3, 2016
|
Thanks for the pull request! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
turboMaCk
Dec 4, 2016
Contributor
This is great! I was dealing with this week ago. This improvement will make it much easier.
|
This is great! I was dealing with this week ago. This improvement will make it much easier. |
evancz
merged commit d302d20
into
master
Dec 12, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Makes sense to me, nice improvement! |
evancz
deleted the
stack-traces
branch
Dec 12, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rtfeldman commentedDec 3, 2016
Suppose we have a bad port invocation that's going to blow up, in a file called
index.html:Before
The stack trace doesn't include the offending function,

invokeBustedPort, or a useful line number indicating where the function was invoked:After
Now it includes both!

What Changed
The basic idea is to do the decoder check immediately inside
send, andthrow new Errorinsidesendso it preserves the best stack trace information.This means that in the
preInitcase it fails slightly sooner, because it does the check before init - and then defers the actual value sending - instead of deferring both.