nil values not throwing errors any more

Ok, I’m definitely not a newbie any more, but I can’t figure out what I’ve done here. I’m using storyboard and a whole bunch of things, but at present, whenever I have a variable which is nil and would otherwise throw an exception in the sim console, it simply gets ignored and everything just works until that point. It’s as if exceptions are being caught and cleanly handled with no useful output (I’m definitely not doing anything deliberate for that effect.)

Any ideas what could cause this?

Oh yes, no code sample because I have a lot of code and I simply haven’t been able to boil it down. So yeah, I’m breaking all my own damn rules.

Only speculating, but perhaps it has to do with the new transition2.0?

After installing any new build after 1206 (or 07?) it comes with transition2.0 which messes up quite a few things if you use transitions anywhere.

But build 1225 seems to have fixed some issues with transition2.0 although have yet been able to download it.

Ok, wow, you won’t believe this. Or maybe you will…

Normally, you would expect this code to throw some sort of error, yes?

a=a..b

Well, that, on it’s own, does. This, however, doesn’t throw anything…

debug = 0 a=a..b 

So, there you have it. To stop throwing errors in your console, just use “debug = 0”.

Did I forget about this feature or is it simply not in the docs?

What you have done is override global ‘debug’ function with number 0. You NEVER NEVER touch debug function! It’s used internaly by Corona and overriding brings only chaos and destruction. For eg. as you have seen error printings become disabled - code just stops and no error.

Yeah, I got that… :frowning:

We all have our noob times I guess.

that’s good to know ! thx piotrz55

And you never touch other Corona-specific global variables and functions (until you really know what you are doing). The list of it can be found in CoronaLabs’ tutorial ‘Goodbye globals’

It’s not, however, listed here: http://docs.coronalabs.com/api/library/global/index.html

There are a few other things in the global space that’s not documented.  Its an easy one to forget about and easy to catch even seasoned programmers.  In fact, it was this exact issue, which after tracking it down in another forum post (I didn’t find it, credit to the person who did, but I don’t remember who :slight_smile:  ) motivated me to write the “Goodbye Globals” post in the first place.

Only speculating, but perhaps it has to do with the new transition2.0?

After installing any new build after 1206 (or 07?) it comes with transition2.0 which messes up quite a few things if you use transitions anywhere.

But build 1225 seems to have fixed some issues with transition2.0 although have yet been able to download it.

Ok, wow, you won’t believe this. Or maybe you will…

Normally, you would expect this code to throw some sort of error, yes?

a=a..b

Well, that, on it’s own, does. This, however, doesn’t throw anything…

debug = 0 a=a..b 

So, there you have it. To stop throwing errors in your console, just use “debug = 0”.

Did I forget about this feature or is it simply not in the docs?

What you have done is override global ‘debug’ function with number 0. You NEVER NEVER touch debug function! It’s used internaly by Corona and overriding brings only chaos and destruction. For eg. as you have seen error printings become disabled - code just stops and no error.

Yeah, I got that… :frowning:

We all have our noob times I guess.

that’s good to know ! thx piotrz55

And you never touch other Corona-specific global variables and functions (until you really know what you are doing). The list of it can be found in CoronaLabs’ tutorial ‘Goodbye globals’

It’s not, however, listed here: http://docs.coronalabs.com/api/library/global/index.html

There are a few other things in the global space that’s not documented.  Its an easy one to forget about and easy to catch even seasoned programmers.  In fact, it was this exact issue, which after tracking it down in another forum post (I didn’t find it, credit to the person who did, but I don’t remember who :slight_smile:  ) motivated me to write the “Goodbye Globals” post in the first place.