Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 5th, 2007, 1:54 AM   #1
amitpansuria
Newbie
 
Join Date: Aug 2007
Posts: 13
Rep Power: 0 amitpansuria is on a distinguished road
how i handle a system that automatically become crshed

helo,
suppose u have well build in product system which is build in linux o.s. now due to reason system automatically become crash(software crash),then how do u handle such crash. which is better way to handle such crash.
amit
amitpansuria is offline   Reply With Quote
Old Sep 5th, 2007, 2:52 AM   #2
rwm
Professional Programmer
 
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2 rwm is on a distinguished road
I suppose something would be causing the system to crash, so you should be checking for errors, and handling them.

For example, you could try using assert, but thats becoming replaced with the more popular exceptions, for example:

class Exception : public std::exception
{
    ...
};

class DivByZeroException : public Exception
{
    ...
};

...
if(IsZero(val))
    throw DivByZeroExc();
...

and in main, for example, you could have:

int main()
{
    try
    {
        ... //do something
    }
    catch(Exception x)
    {
        //handle
    }
}

Google for exceptions. That should help.

rwm is offline   Reply With Quote
Old Sep 5th, 2007, 4:16 AM   #3
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 929
Rep Power: 4 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by amitpansuria
helo,
suppose u have well build in product system which is build in linux o.s. now due to reason system automatically become crash(software crash),then how do u handle such crash. which is better way to handle such crash.
amit
<parse error>

<brain explodes>

That is to say, HUH?
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp
lectricpharaoh is offline   Reply With Quote
Old Sep 5th, 2007, 4:23 AM   #4
rwm
Professional Programmer
 
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2 rwm is on a distinguished road
Don't be a meansie hard ass!
rwm is offline   Reply With Quote
Old Sep 5th, 2007, 4:42 AM   #5
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 929
Rep Power: 4 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by rwm
Don't be a meansie hard ass!
I'm not. I honestly couldn't figure out what he was trying to say, other than his program crashed (or keeps crashing), and he wants to know what to do. He phrases it like a multiple choice ("which is better way"), but doesn't indicate which options are available, or which have been considered. There was no helpful information given, no specific details of what he was trying to accomplish or how the program was crashing.

In that, the post was no different than many others we get here, but the abuses he heaped upon the English language cried out for response. Yes, I realize that English is most certainly not the native language of the OP, but that post was just incomprehensible.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp
lectricpharaoh is offline   Reply With Quote
Old Sep 5th, 2007, 5:25 AM   #6
rwm
Professional Programmer
 
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2 rwm is on a distinguished road
I was kidding!

Some people just can't speak/write english
rwm is offline   Reply With Quote
Old Sep 5th, 2007, 3:40 PM   #7
peaceofpi
hi: for(;;) goto hi;
 
peaceofpi's Avatar
 
Join Date: Jun 2006
Posts: 86
Rep Power: 3 peaceofpi is on a distinguished road
Send a message via AIM to peaceofpi Send a message via MSN to peaceofpi
I'll give it a whirl
Quote:
helo,
suppose u have well build in product system which is build in linux o.s. now due to reason system automatically become crash(software crash),then how do u handle such crash. which is better way to handle such crash.
amit
Suppose you have a [???] product system which is built in Linux. Now due to an unknown reason, the system crashes because of the software. How do you handle the crash, and what is the best way?

Something like this should be implemented in forum registration
__________________
How do you play Religious Roulette?
Stand around in a circle and blaspheme till someone gets struck by lightning.
peaceofpi is offline   Reply With Quote
Old Sep 5th, 2007, 3:54 PM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Debug the product and reboot the system.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Sep 5th, 2007, 5:34 PM   #9
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 929
Rep Power: 4 lectricpharaoh will become famous soon enough
Invest in a wetware upgrade for the biological component of the system. This should remedy a lot of the inter-system communications issues.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp
lectricpharaoh is offline   Reply With Quote
Old Sep 5th, 2007, 5:36 PM   #10
Seif
Hobbyist Programmer
 
Seif's Avatar
 
Join Date: Jan 2006
Location: UK
Posts: 213
Rep Power: 3 Seif is on a distinguished road
I would handle it by displaying a message blaming the end user for breaking my code
Seif is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to meet these cross-platform project goals? mattengland C++ 1 Apr 3rd, 2006 4:01 AM
PHP system commands ktsirig PHP 6 Oct 4th, 2005 1:24 AM
Windows Hook on Win9x system dc2000 C++ 0 Jul 4th, 2005 5:27 PM
System Info Da-Kid C++ 9 Feb 15th, 2005 6:46 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:41 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC