This is quite important since in most cases we don't know at the top of our project from which file originated the error and we don't want to pass all the files imported.
So we definitely need a way to get back the location so we can give the correct file while printing.
if let Err(e) = my_result {
e.eprint(&std::fs::read_to_string(&e.location().0).unwrap());
}
This is quite important since in most cases we don't know at the top of our project from which file originated the error and we don't want to pass all the files imported. So we definitely need a way to get back the location so we can give the correct file while printing.