Poll: how much context to give for async error messages?

I was thinking about this some more and I had a few thoughts:

  • First of all, I think it would make sense to spend more time iterating on the original message. e.g., I think it might be better if we inverted the place that we "report" the error so that we report the leaf function as the primary place, and then give the "main function" as an additional "note" with context. This would require some experimentation.
  • More than a verbose flag, I'd be really excited if we had ways to "go beyond the command line" in terms of giving rich errors that can be expanded to get more context. I don't yet know how that would work. I loved the idea of webm that @nrc was pursuing at some point, but who knows if it would take off; better would presumably be to integrate with VSCode, but I don't know that they have any features that would permit richer error messages.
  • If we were going to add a "verbose" flag, I was thinking that one of my main concerns would be people not knowing it's there, meaning that we do a lot of work to add it with little value. But maybe if there were a "note" that reminds you that you can use this flag to get the full details, I'd feel somewhat better about it. Still, I think I remain of the feeling that we should push really hard to see what we can get without such a flag, because I'm not convinced we've exhausted the space here.
3 Likes