Open clifton opened 2 years ago
This is a great idea that is definitely worth implementing. I opened a discussion (#25) for this.
Maybe something like this?
// dotenvy::Error
enum Error {
LineParse(String, usize),
Io(Error),
EnvVar(VarError, String), // name is here
}
This is just a suggestion. It could be possible that the name information could be used for other variants like LineParse
, I am not sure yet.
Great, thanks
I was looking into mapping the error and adding context (eg, "missing VAR_XYZ"), but it would be a breaking API change. Any suggestions for how to structure that change?