hello developers as any game my game contains movieclips and images when error happens entire game paused and all objects become static how can i neglect (object expected a nil value … ) error without pausing and crashing all my game [import]uid: 74537 topic_id: 20598 reply_id: 320598[/import]
This may sound like a cynical answer, but it’s genuine.
Fix your errors.
Buggy code will be rejected by Apple. Players will rate your game negatively if there are problems.
Of course you’re thinking “I’ll fix them later, but I want to test this part of my code now then get to those problems.” And while that has validity, if you short circuit the error so it doesn’t show up, you may forget to go back and fix it.
If you absolutely have to do this, comment out the offending problem, and put in something simple in its place. In your example, skip the movieclip and just use a static image until you can get back to it.
I’ve been programming for over 30 years. What you’re wanting to do is a bad idea. [import]uid: 19626 topic_id: 20598 reply_id: 80836[/import]
@robmiracle - Like ur advice… [import]uid: 84539 topic_id: 20598 reply_id: 80863[/import]
agree fix the errors
why would you want to run code with errors
maybe if you posted the errors we could help solve them [import]uid: 7911 topic_id: 20598 reply_id: 80882[/import]
thanks all thanks @robmiracle for this advice but i did not mean that i must skip that error i am testing my game intensive test but the scenario i have is some times exception happens i did not say that my code is buggy i have fixed them all
the exception may be caused by object nullity so if i want to
try {} catch {} for specific function call how can i do that in corona is there any way to do something like JAVA and C# exception handling ?? that is my question my game contains modules written well formed and all of them under control
but as any programmer i want to learn not to just implement i have seen in some forums that there is something like key words can be added in main.lua to make something for your bugs as handlers but i don’t remember the link
thanks all
with respect
[import]uid: 74537 topic_id: 20598 reply_id: 81009[/import]
Check out this page:
http://failboat.me/2010/lua-exception-handling/
I’ve not tried it. In Corona you do not do:
dofile “try”
but a
local try = require “try”
instead.
That gives you some exception handling.
[import]uid: 19626 topic_id: 20598 reply_id: 81054[/import]
thanks @robmiracle Thats What I really Need
[import]uid: 74537 topic_id: 20598 reply_id: 81628[/import]