In https://github.com/rocicorp/repc/issues/351 we can see a DbReadError and a PullFailed error. These are variants of OpenTransactionError and BeginTryPullError respectively. However when printed the name of the enum (OTE and BTPE) is not printed, just the variant (DRE and PF) is printed. This is because we derive Debug for all our errors, and the default implementation is to print the variant but not the enum name:
When derived for ... enums, it will use the name of the variant
In https://github.com/rocicorp/repc/issues/351 we can see a DbReadError and a PullFailed error. These are variants of OpenTransactionError and BeginTryPullError respectively. However when printed the name of the enum (OTE and BTPE) is not printed, just the variant (DRE and PF) is printed. This is because we derive Debug for all our errors, and the default implementation is to print the variant but not the enum name:
-- https://doc.rust-lang.org/beta/std/fmt/trait.Debug.html
We need to implement Debug for our errors such that the enum name is printed along with the variant and anything it contains.