mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Fix reporting error without span
such as error from the interpreter that the file cannot be loaded
This commit is contained in:
parent
d829a18ddd
commit
cc619fd7d4
1 changed files with 3 additions and 1 deletions
|
@ -310,7 +310,9 @@ impl BuildDiagnostics {
|
||||||
.inner
|
.inner
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|d| {
|
.filter_map(|d| {
|
||||||
let spans = if let Some(sf) = &d.span.source_file {
|
let spans = if !d.span.span.is_valid() {
|
||||||
|
vec![]
|
||||||
|
} else if let Some(sf) = &d.span.source_file {
|
||||||
if let Some(ref mut handle_no_source) = handle_no_source {
|
if let Some(ref mut handle_no_source) = handle_no_source {
|
||||||
if sf.source.is_none() {
|
if sf.source.is_none() {
|
||||||
handle_no_source(d);
|
handle_no_source(d);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue