Show KCL backtraces (#7033)

* Add backtrace to errors

* Add display of backtraces with hints

* Change pane badge to only show count of errors

* Fix property name to not collide with Error superclass

* Increase min stack again

* Add e2e test that checks that the diagnostics are created in CodeMirror

* Remove unneeded code

* Change to the new hotness
This commit is contained in:
Jonathan Tran
2025-05-19 14:13:10 -04:00
committed by GitHub
parent bfa2f67393
commit ddb034b14d
53 changed files with 1543 additions and 1322 deletions

View File

@ -51,7 +51,7 @@ pub fn parse_tokens(mut tokens: TokenStream) -> ParseResult {
} else {
format!("found unknown tokens [{}]", token_list.join(", "))
};
return KclError::Lexical(KclErrorDetails { source_ranges, message }).into();
return KclError::Lexical(KclErrorDetails::new(message, source_ranges)).into();
}
// Important, to not call this before the unknown tokens check.