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.
p.s. while I’m wondering about this, is there any reason that we can’t get tracebacks in JS errors like we can in other JS environments (such as the browser I am writing this from.) Often it’s helpful to know where your function was called from.
Thanks Mzed. Nah, the same problem occurs even if the function is called "spath", and as much as "path" could plausibly be an undocumented reserved word, both "spath" and "path" being reserved words is really pushing plausibility.
…but for now I might prioritise getting something creative done today ;-)