On Saturday, 14 August 2021 at 13:24:22 UTC, Tejas wrote:
...
I don't think there are any gotchas here. The problem with this technique, is when your exceptions aren't just simple labels but also carry some additional data, say for example specific error type, and subject that, caused this. In such cases you can't have a gloablly shared instance. Let's say it's doable but has lot's of drawbacks.
Regards, Alexandru.