NetLogo / Tortoise

Compiler and runtime engine for NetLogo models that runs in JavaScript 🐢
https://netlogoweb.org
Other
56 stars 27 forks source link

Improve the error message of some issues #238

Closed CIVITAS-John closed 2 years ago

CIVITAS-John commented 2 years ago

Hi,

This issue is proposed by @Brainchon. See my reproduction.

Ideally, the error message should be the same as static compiling (hatch cannot be used). Instead, it will show the corresponding engine function not existed (SelfManager.self(...).hatch is not a function).

to setup
  ask patches [ run "hatch 1" ]
end
LaCuneta commented 2 years ago

@CIVITAS-John I'm going to close this as a duplicate of #184. This would fall into the procedure context tracking, as it says there:

Also left to do are the remaining skipped language tests in the TortoiseFinder. Many of those depend on procedure context also tracking the current agent type: observer, turtle, patch, or link, which would be a logical next thing to add.

I will add a language test to NetLogo for this particular case, though (using run with a string or task).