3 ms·
Author of `wherr` here. I agree that you wouldn't always want to pay the extra cost for this information. However, I imagine real-world use-cases when it's pre
by JoelJacobson 3y ago
Author of `wherr` here. I agree that you wouldn't always want to pay the extra cost for this information.
However, I imagine real-world use-cases when it's preferable to pay that cost in production, allowing users to forward file and line information to the original developer via a bug report.
Alternatively, indirectly, for instance via some company's customer support, that might ask the customer to include output from their program, which they in turn can let their developers analyse, who in turn can contact the developer of the library used, where the error originates from.
Not having this information in production, means the original developer will need to try to figure out how to reproduce the error locally, which might be necessary anyway of course, but the effort will probably be less, given the file and line information.
That said, I agree with you that the most likely use-case, is to enable this only when debugging, on a per-function basis, when needed.