Skip to content

Conversation

@andylokandy
Copy link
Contributor

@andylokandy andylokandy commented Jan 16, 2026

This refers to #20

@andylokandy andylokandy mentioned this pull request Jan 16, 2026
@andylokandy
Copy link
Contributor Author

andylokandy commented Jan 17, 2026

Seems not possible to override and proxy the downcast_ref of dyn std::error::Error to the inner error, so downcast will not work once Exn is wrapped into a dyn Error.

@andylokandy
Copy link
Contributor Author

andylokandy commented Jan 18, 2026

Seems not possible to override and proxy the downcast_ref of dyn std::error::Error to the inner error, so downcast will not work once Exn is wrapped into a dyn Error.

anyhow does the same--disallowing downcast once boxed into a dyn std::error::Error.

@tisonkun
Copy link
Contributor

Seems not possible to override and proxy the downcast_ref of dyn std::error::Error to the inner error, so downcast will not work once Exn is wrapped into a dyn Error.

anyhow does the same--disallowing downcast once boxed into a dyn std::error::Error.

Based on our API, one can first downcast the Error to Frame and then call Frame::error to fetch the internal error and call downcast on that error instead?

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM

We may considere how to introduce the concept of Frame to users.

Exn is the final interface and Frame wraps the inner error that users can do some advanced interaction; see examples?

@andylokandy
Copy link
Contributor Author

Based on our API, one can first downcast the Error to Frame and then call Frame::error to fetch the internal error and call downcast on that error instead?

Yes.

@andylokandy andylokandy marked this pull request as ready for review January 18, 2026 07:24
@andylokandy andylokandy mentioned this pull request Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants