如何在出现错误时跳到下一次迭代

How to skip to the next iteration in case of an error

在 Netlogo 行为 space 中,如果其中一个 运行 抛出错误,如何跳过那个 运行 并要求 netlogo 继续下一个 运行?

这可能吗?

来自文档,

If you do want spreadsheet output, note that if anything interrupts the experiment, such as a runtime error, running out of memory, or a crash or power outage, no spreadsheet results will be written. For long experiments, you may want to also enable table format as a precaution so that if something happens and you get no spreadsheet output you'll at least get partial table output.)

因此,我假设这是不可能的,解决此问题的最佳方法是处理您的代码有错误的情况。或者,您可以使用 carefully 命令来处理错误消息。