moai/moai-dev — pull request #592 by sporksmith (2012-10-18 19:02:17+00:00)
Title: Log file open fails pull req

I added some error messages in cases where a file isn't found or can't be opened. It's nice to know right away when this is the case instead of silent failure and then wondering why an image isn't being displayed, sound being played, etc.

Where possible I tried to check whether the file was actually opened successfully, instead of checking for file existence before trying to open it. The latter approach can miss some corner cases such as if the file has incorrect permissions.