mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
bundled translation: Better error reporting
forward the error up the stack instead of panicking while producing the llr
This commit is contained in:
parent
3f8084cdc0
commit
73b549a42c
6 changed files with 21 additions and 13 deletions
|
@ -415,7 +415,11 @@ pub fn slint(stream: TokenStream) -> TokenStream {
|
|||
return diag.report_macro_diagnostic(&tokens);
|
||||
}
|
||||
|
||||
let mut result = generator::rust::generate(&root_component, &loader.compiler_config);
|
||||
let mut result = generator::rust::generate(&root_component, &loader.compiler_config)
|
||||
.unwrap_or_else(|e| {
|
||||
let e_str = e.to_string();
|
||||
quote!(compile_error!(#e_str))
|
||||
});
|
||||
|
||||
// Make sure to recompile if any of the external files changes
|
||||
let reload = diag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue