if error occures...
Author |
Message |
greenapplesodaex
![](http://img.photobucket.com/albums/v235/greenapplesodaex/big.jpg)
|
Posted: Tue Jun 08, 2004 9:24 pm Post subject: if error occures... |
|
|
if error occures, such as int out flow or string left bound less than 1, can i somehow, stop the program from shuting down and jsut skip this part by using "return" or "exit"?? can i detect error in turing before it shuts down and do something to it? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Tue Jun 08, 2004 9:56 pm Post subject: (No subject) |
|
|
you'd probably have to error trap that by first checking if the number is small enough to not allow an overflow (such as if you're *=2 then make sure the number is <(maxint/2)
check what kind of bounds you're using for your string...
Just try to get into a habbit of now allowing such events to occur, and if that is out of your control, then error trap that |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
greenapplesodaex
![](http://img.photobucket.com/albums/v235/greenapplesodaex/big.jpg)
|
Posted: Wed Jun 09, 2004 1:30 pm Post subject: reply |
|
|
awww.. poop |
|
|
|
|
![](images/spacer.gif) |
aside
|
Posted: Wed Jun 09, 2004 3:18 pm Post subject: (No subject) |
|
|
if you can make something that detects error and stop the program before it crashes, then you are good enough to make a program that doesn't crash. |
|
|
|
|
![](images/spacer.gif) |
greenapplesodaex
![](http://img.photobucket.com/albums/v235/greenapplesodaex/big.jpg)
|
Posted: Wed Jun 09, 2004 5:21 pm Post subject: reply |
|
|
isnt that what tony just said? ![Rolling Eyes Rolling Eyes](images/smiles/icon_rolleyes.gif) |
|
|
|
|
![](images/spacer.gif) |
|
|