This is also likely to lead to a substantial slowdown on NetLogo Web, since it will introduce runtime error-checking
My strategy for doing this initially is not necessarily a winning one. I wanted to centralize error-reporting in one place, but some primitives do error-reporting while in the midst of running a lambda, which makes it trickier. There’s still hope for that approach, though; the lambda could instead lead to returning a value that indicates an error, and the middle layer could then read that value and figure out if it needs to generate an error. Does this have an unpleasant effect on stacktraces, though?