Page 1 of 1
Any code to make CATCH EXCEPTION ERROR ???
Posted:
Sun Jul 19, 2009 7:24 pm
by Bee-Ant
Who knows?
Re: Any code to make CATCH EXCEPTION ERROR ???
Posted:
Sun Jul 19, 2009 9:17 pm
by skydereign
Did you get that error? Because if you did, you have that code. It is probably not what I think it is, as I thought catch was not in C, it has a counterpart, but I don't' know much about it. If you do have the code that causes this error, can we see it?
Re: Any code to make CATCH EXCEPTION ERROR ???
Posted:
Mon Jul 20, 2009 1:16 am
by Bee-Ant
No,im just asking.
Like in VB, it could show an our own error message once the app cant handle the logic of the code we're trying to launch...
Is there?
Maybe
- Code: Select all
try
{
//the code we want to launch
}
catch ex as exception
{
//our own error confirmation
}
Re: Any code to make CATCH EXCEPTION ERROR ???
Posted:
Mon Jul 20, 2009 4:14 am
by skydereign
Okay, that is more like it... There is an equivalent in C, but it does not use throw/catch.
Re: Any code to make CATCH EXCEPTION ERROR ???
Posted:
Mon Jul 20, 2009 4:48 am
by Fuzzy
Just dont make errors in the first place!
From what I know of try/catch it slows things down. Its best use is not in logic, but in events that are unpredictable, such as opening a file dialogue. You see it a lot in java where things might be used on different operating systems.
The way that I do it is to have an variable. Add in lines of code in the area you are interested in and have a actor display a message. Or write to text files. DST does that too.
Re: Any code to make CATCH EXCEPTION ERROR ???
Posted:
Mon Jul 20, 2009 5:14 am
by skydereign
I use a similar method, made a function that I call to write a string, add variables or anything else. That way I read the text file, and it will tell me all relevant variables, in turn showing what goes wrong.
Re: Any code to make CATCH EXCEPTION ERROR ???
Posted:
Mon Jul 20, 2009 10:34 am
by Fuzzy
skydereign is right. Its a great way to see what was happening when your game crashes.
Re: Any code to make CATCH EXCEPTION ERROR ???
Posted:
Mon Jul 20, 2009 4:06 pm
by Bee-Ant
Yes, I always do that when testing the game...just when testing,I cant show it on the real game.using sprintf is the best way. But what i want is it can show the error message automatically once the game crashed..because my game often STOPPED WORKING if i let it iddle for some time...