I was cleaning up some of my code when I noticed something that might be obvious, but I didn't realise before: Attempting to access variables that do not exist by iterating a table and calling functions on them does not result in any errors.
For example:
Lua Code:
for k, v in pairs({ThisDoesNotExist, NorDoesThis}) do v:Show() end
This doesn't cause any errors.
Why is this? I find it rather counter-intuitive. I'm now going over all my code where I attempt to access global variables through tables and making sure I do a _G lookup by name instead - otherwise, I never know when one of the frames I'm trying to access no longer exists.