kyleoneill / chimerascript

0 stars 0 forks source link

Clean up error handling part 2 #33

Open kyleoneill opened 9 months ago

kyleoneill commented 9 months ago

A lot of functions are passed data that they don't need just to construct error types. It would be better for functions to generate errors only with the information immediately relevant to them and then line-specific information, like the current line or data from Value::print_error(), is added to the error as it's bubbled back towards the line handler.

Maybe split the runtime error into an "internal" and "external" where the external is used by everything in the commands folder and internal is used by everything else.