3 ms·
Considering that Chrome and Firefox have enough native Javascript stack trace support to make this trivial, I'm not sure why you would want to do this in produc
by cromwellian 15y ago
Considering that Chrome and Firefox have enough native Javascript stack trace support to make this trivial, I'm not sure why you would want to do this in production:
1) introduce added network latency (time to proxy / parse / instrument) + risk of downtime of proxy
2) adding try/catch to every function in your program will make it larger and increase download / parse time
3) try/catch blocks can cause performance hits on some JS VMs, so you're slowing down your runtime as well.
- diolpah 15y agoI believe the selling point here is that N in-house testers won't expose nearly as many bugs as M actual users will, where N << M.
- Hovertruck 15y agoThis doesn't (or shouldn't be) using try/catch, but rather just firing a request to their server when the window.onerror event is triggered.
- cromwellian 15y agoThe Proxino blog/website says they parse the JS into an AST and add try/catch blocks to every method.