Any code to make CATCH EXCEPTION ERROR ???

Non-platform specific questions.

Any code to make CATCH EXCEPTION ERROR ???

Postby Bee-Ant » Sun Jul 19, 2009 7:24 pm

Who knows?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Any code to make CATCH EXCEPTION ERROR ???

Postby skydereign » Sun Jul 19, 2009 9:17 pm

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?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Any code to make CATCH EXCEPTION ERROR ???

Postby Bee-Ant » Mon Jul 20, 2009 1:16 am

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
}
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Any code to make CATCH EXCEPTION ERROR ???

Postby skydereign » Mon Jul 20, 2009 4:14 am

Okay, that is more like it... There is an equivalent in C, but it does not use throw/catch.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Any code to make CATCH EXCEPTION ERROR ???

Postby Fuzzy » Mon Jul 20, 2009 4:48 am

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.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Any code to make CATCH EXCEPTION ERROR ???

Postby skydereign » Mon Jul 20, 2009 5:14 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Any code to make CATCH EXCEPTION ERROR ???

Postby Fuzzy » Mon Jul 20, 2009 10:34 am

skydereign is right. Its a great way to see what was happening when your game crashes.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Any code to make CATCH EXCEPTION ERROR ???

Postby Bee-Ant » Mon Jul 20, 2009 4:06 pm

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...
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron