View Single Post
  #3 (permalink)  
Old 08-07-2007, 05:50 PM
osval osval is offline
Member
 
Join Date: Jul 2007
Posts: 26
osval is on a distinguished road
I solved my problem!
in the line
Code:
int code = Integer.parseInt(reply.substring(0,3));
That has to be what's throwing the NumberFormat exception. I had to put a try block in there and return -1 if an exception is indeed thrown.

output the substring before you try to parse it so you can see exactly what it's trying to parse.

Last edited by osval : 08-07-2007 at 06:13 PM.
Reply With Quote