Exceptions thrown during undo are hidden and not logged to the console
This makes for some confusing debugging
Sorry, I filed this when I was very much in the middle of things, and now it seems that my initial assessment wasn't entirely accurate. I tested this with a very dirty
return {
undo() {
throw "meow";
}
}
and it looks like only objects that aren't exceptions but are nevertheless thrown get swallowed up and hidden like this.
The original issue that lead to me trying this turned out to be a misunderstanding on my part, regarding how promises interact with the JavaScript event loop (resolving a promise doesn't immediately execute everything, but schedules it to be the next thing the event loop does, and so my implementation of "skip all pending sleeps and spam that until the animation finishes" didn't work).