I’m currently writing some TypeScript, (in MakeCode Arcade obviously) and it currently isn’t but I plan on it becoming an extension. It appears that throw new Error(); is not supported, as Error isn’t defined. What are the options available to alert people to runtime errors?
If this style of writing extensions isn’t commonly done, I’m open on other ways to structure my extension. (It’s something (that may or may never get released, who knows) that parses images with a specific format, and if the dev pastes in the wrong type of image, or the format is unsupported, or bad values in parsing, I want to throw an error.)
I belive raising exceptions is a part of the ommited features for the modified TS build MakeCode is using. You could try structuring a custom(?) error splash screen or something of that kind.
I’ve tried that, but a single number isn’t really that informative
Plus, I’m not sure which numbers are already used by Arcade, because I’m not sure how much this page covers.
if you really want to use a panic code you can, but you want to use something that isn’t in the 9XXs or the 0XXs since those are reserved for system errors.
Well, I don’t think I would need an extension, I just needed a way to crash the program, hopefully with an informative message and it appears that throw "string"; does what I want.