parsonsmatt / annotated-exception

Machinery for throwing and catching exceptions with some annotation.
BSD 3-Clause "New" or "Revised" License
32 stars 3 forks source link

`flatten` should use `addCallStackToException` #23

Closed glasserc closed 1 year ago

glasserc commented 1 year ago

Currently it just concatenates annotations using (++), which means we can get two CallStack annotations in an exception.

parsonsmatt commented 1 year ago

Can you post a demonstration? I tried to ensure that the API in the library preserved the right invariants, so if I know where the problem is, then that makes it easier to diagnose. Thanks!

glasserc commented 1 year ago

I wasn't exactly sure what qualified as the API in the library but I wrote a few test cases demonstrating the problem in the linked PR.