I'm glad to have helped.
Type: Posts; User: sunde
I'm glad to have helped.
When you try and parse an integer that contains something other than 0-9, what happens? Is an exception thrown? If so, which?
Try catching that exception in the catch and do whatever you want in...
try{
//try something
} catch(/*some exception*/){
//do something as a result of catching the exception
}
read up on exceptions if necessary.
Sounds like you may want to wrap the parse in a try catch clause, and be prepared to catch a number format exception.