project-chip / rs-matter

Rust implementation of the Matter protocol. Status: Experimental
Apache License 2.0
323 stars 45 forks source link

[Error handling] Put extra logging and propagate backtraces #192

Open ivmarkov opened 3 months ago

ivmarkov commented 3 months ago

For a certain set of errors, specifically ErrorCodes:

... we should:

... to get extra context for debugging. Because these errors are:

The cost of preserving the original error should not be that high as we don't expect these errors to happen frequently, but unfortunately we can only due it in the presence of alloc. Without alloc, preserving the original errors means generics which will virally pollute all our APIs which is just plain impossible to handle.

We might even decide to model these errors in a different way from the rest. To be decided.