Don't emit the OS error in a note
This makes it possible to make the normalization of the error message more precise, allowing us to not normalize all notes away.
This commit is contained in:
parent
f24983222d
commit
97fb15d950
3 changed files with 12 additions and 13 deletions
|
@ -97,9 +97,12 @@ pub(crate) fn fluent_messages(input: proc_macro::TokenStream) -> proc_macro::Tok
|
|||
let resource_contents = match read_to_string(absolute_ftl_path) {
|
||||
Ok(resource_contents) => resource_contents,
|
||||
Err(e) => {
|
||||
Diagnostic::spanned(resource_span, Level::Error, "could not open Fluent resource")
|
||||
.note(e.to_string())
|
||||
.emit();
|
||||
Diagnostic::spanned(
|
||||
resource_span,
|
||||
Level::Error,
|
||||
format!("could not open Fluent resource: {}", e.to_string()),
|
||||
)
|
||||
.emit();
|
||||
return failed(&crate_name);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue