Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Expose part of de::ErrorInner publicly #364

Closed
wants to merge 4 commits into from
Closed

Expose part of de::ErrorInner publicly #364

wants to merge 4 commits into from

Conversation

Luthaf
Copy link
Contributor

@Luthaf Luthaf commented Dec 10, 2019

See #360.

The second commit exposes de::ErrorKind publicly, if this is not desired I can remove it. It should be fine to expose since it is already marked as non_exhaustive, using #[doc(hidden)].

@alexcrichton
Copy link
Collaborator

Could you expand a bit on the rationale for this change? What are you looking for to get out of these new accessors?

@Luthaf
Copy link
Contributor Author

Luthaf commented Dec 12, 2019

My use case is to customize the error message displayed to the user, adding specific context and rewording them.

I am using TOML as input file for my code, and currently manually transforming from toml::Value to the structs. I would like to use serde instead, but the current error messages are not ideal.

@alexcrichton
Copy link
Collaborator

Sorry but I unfortunately do not have time to review PRs to this crate right now. I hope to get a chance to review this in the future but I'm likely to be busy for some time now.

@Luthaf
Copy link
Contributor Author

Luthaf commented Dec 17, 2019

No problem, this is not urgent on my side =)

@Luthaf
Copy link
Contributor Author

Luthaf commented Jun 2, 2020

@alexcrichton, do you foresee having some time to review this in the near future? Or is there another maintainer for this crate?

No pressure, I would like to know before I look for other solutions 😃

src/de.rs Outdated Show resolved Hide resolved
src/de.rs Outdated Show resolved Hide resolved
@Luthaf Luthaf requested a review from ehuss June 10, 2020 09:32
@Luthaf
Copy link
Contributor Author

Luthaf commented Sep 30, 2020

@alexcrichton or @ehuss, I would appreciate if one of you could give this a new look =) Thanks!

@smoelius
Copy link

smoelius commented May 9, 2022

Is this PR still being considered?

@Luthaf
Copy link
Contributor Author

Luthaf commented May 9, 2022

I no longer need this functionality, but I'm happy to rebase and update the PR if there is a path for it to be reviewed & merged.

@smoelius
Copy link

smoelius commented May 9, 2022

Thank you, @Luthaf.

@ehuss Would you still consider adding this functionality?

@smoelius
Copy link

@Luthaf In the event this PR is not merged, may I ask, did you find an alternative solution? My use case is the same as yours:

My use case is to customize the error message displayed to the user, adding specific context and rewording them.

@epage
Copy link
Member

epage commented Sep 23, 2022

toml-rs has moved to https://github.com/toml-rs/toml_edit. Feel free to rebase your PR against that repo and open a new issue there.

@epage epage closed this Sep 23, 2022
@Luthaf Luthaf deleted the expose-error branch September 23, 2022 16:03
@Luthaf
Copy link
Contributor Author

Luthaf commented Sep 23, 2022

I don't have a need for this anymore, but thanks a lot for picking up this project!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants