Why is it that JS in Max sometimes dumps perfectly good errors to the max window, and other times dumps the opaque, unhelpful message "error calling function foo"? This gives no clue as to the line number or the nature of the error triggering the problem, so you are reduced to commenting out lines at a time until it is fixed.
I have a bit of JS that I am debugging right now for example where the same is causing the error.
one function, called "bitememaxmsp" fails with the error
js: error calling function bitememaxmsp
No problem, I can debug that.
However, another function, called "path", fails to print any useful information and simply dies with
js: error calling function path
Workarounds gratefully appreciate, or even just hints as to what triggers this error-swallowing behaviour.