Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Log undefined variables.

I think it would be a good idea to have the log function be able to handle undefined values. I was easy enough to add this in as a wrapper, but I had an annoying 45 minutes trying to track down the culprit of a crashing bug. I just think it would be nice to distinguish between "You logged an undefined varable." and "Undefined variable somewhere in your code crash."
1370295682
Alex L.
Pro
Sheet Author
what like log("" + thing);
My suggestion is that if thing is undefined then don't crash out just log that it's undefined. log(thing); //thing is undefined and that information makes it to the console without a crash
This should now work.
Well that sure was quick. Thank You.