Open darzu opened 4 years ago
One solution would be to make the message more specific, and clearer: "Variable statusbar
used before assignment", and also show an error icon on the block. Do we have enough information to do that? Would it require blocks and JS to share an AST?
We have a way to sourcemap from JS to Blocks. And we get a stack trace. So we should be able to highlight the block. But the blocks error list is maybe the right way to surface this.
But yes, rewording should be the first step.
This is pending Hristo work of showing error panel which stays and can point to the block right?
It is pretty clear in typescript that statusbar is null.
In this game, it's very hard to find where the issue comes from: https://makecode.com/_J4tTuk0XEDoH
In general, we need a better error message and better indications in the editor of likely causes when this happens.
This is one of the most common errors in Arcade.