The current error system is very disjointed and disorganized, with many different desmoscript error types scattered everywhere, each with an unclear purpose. I plan to do the following to make errors easier to deal with:
Each error gets its own custom error type. These will be differentiated to a high level of granularity, and will all be listed in a centralized manner in one location instead of being scattered throughout the compiler.
Things that accept errors should accept the whole range of errors, not just one or two error types.
Errors should have some special property that identifies them as such (like _desmoscriptError or something). That way, I can easily catch errors and propagate them down the stack in a more controlled manner instead of just fearfully assuming that any error that's thrown could be from some external source.
The current error system is very disjointed and disorganized, with many different desmoscript error types scattered everywhere, each with an unclear purpose. I plan to do the following to make errors easier to deal with:
_desmoscriptError
or something). That way, I can easily catch errors and propagate them down the stack in a more controlled manner instead of just fearfully assuming that any error that's thrown could be from some external source.