16:53 | <shu> | practitioners: do you expect/want Error.prototype.stack strings to chain together stacks from .cause ? or do you only expect that chaining to happen in more "sophisticated" printing places like the DevTools console and console.log? |
16:54 | <shu> | i feel like it's weird to have the .stack string automatically chase .cause chains because then you have to parse the string to figure out which is a particular error object's stack |
16:55 | <Jack Works> | 🤔 That's an interesting problem. I believe both have their use cases. Is it possible to make this feature configurable in the devtools? |
16:55 | <shu> | i guess that's possible, but it doesn't feel right to have devtools configure the fundamental behavior of the .stack string |
16:56 | <shu> | for context: Firefox only chase .cause stacks in the more sophisticated printing places like console, afaict |
16:56 | <Kris Kowal> | I’d expect DevTools to help introspect both cause and aggregate error, and I expect neither to be reflected in the error.stack. |
16:57 | <shu> | that's my intuition, Kris Kowal |
16:57 | <shu> | trying to decide what to do for chrome, that choice (which FF already made) seems like the right one |
16:57 | <Jack Works> | Yeah, firefox's behavior is good |
16:58 | <Jack Works> | Developers don't type err.stack (in the console), they type err |
16:58 | <Kris Kowal> | Meanwhile, inspecting a causal graph is close to what Miller Columns were invented for. |
16:58 | <shu> | i see |
16:58 | <Jack Works> | And that should track the causes so it shouldn't be reflected in the stack string |
16:58 | <shu> | programmatically it's pretty easy to just keep chasing .cause yourself anyway |
16:58 | <shu> | if you want to build up the stack string with all the cause chain |
17:00 | <Kris Kowal> | Domenic certainly will have opinions. He implemented Q’s “long traces”. |
17:23 | <snek> | practitioners: do you expect/want |
17:24 | <snek> | each individual error's stack string should ideally remain as-is |
18:18 | <ljharb> | I also agree that's the right behavior |
18:35 | <Justin Ridgewell> | Can we have a second getter called fullStack ? 😂 |
18:42 | <shu> | .tellMeWhy |