checkLoops method
void
checkLoops()
Implementation
void checkLoops() {
loops++;
if (maxLoops >= 0 && loops >= maxLoops) {
throw LoopError(
"Max loop count exceeded.",
LoopError.maxLoopsExceeded,
);
}
}