Closed philomates closed 3 years ago
👋 @philomates – thanks for the PR and warning about the error message not being so helpful when it's simply slow to compile! Totally agree it needs to be changed.. and I'll definitely change it for the next release (adding instructions about how to override it, so one doesn't have to RTFM), something like :
Preventing infinite/slow loop! Find bug or add '//noprotect' to override...
In P5LIVE, I disable console.logs that are the same (to avoid flooding it) – so this longer text would only appear once. closing this, since I should add this to the pre-minified/browserified version of this loop-protect
Nice, thanks!
I got caught up today with the console error message
Uncaught Infinite Loop! Check code and recompile...
for code that wasn't executing infinitely, but instead executing for a long time.This pull request changes the error to
Uncaught Infinite or slow loop! Check code and recompile...
I would change it in the original https://github.com/popcodeorg/loop-breaker library but it P5LIVE pulls it in minified and adapts the error message they have