I've been working with Eclipse ADT for about 2 months. In that time I
have a small utility that allows me to select an IP Address and Port,
and then send a file to that combo. The utility works as intended, but
when I type in the wrong file name, the application hangs.
@Override
public void run() {
if (data != null) {
this.send(data);
} else if (this.file != null) {
if (file.exists()) {
this.send(file);
} else {
transferError = new FileNotFoundException("The specified
file could not be found");
}
}
}
I've even tried to do the following in hopes that one or the other
would throw, but I am unsuccessful in both.
public void run() {
if (data != null) {
this.send(data);
} else if (this.file != null) {
if (file.exists()) {
this.send(file);
} else {
transferError = new FileNotFoundException("The specified
file could not be found");
}
}try {
throw new Exception("blah blah blah");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
I've jockeyed around the exception, I've added the one above, I've
tried placing it in different places, and all unsuccessful. Again, I'm
exceptionally new to this, and got here from basically mincing various
tcp client codes. Aside of creating a way to throw the exception
correctly, please help me understand why the first one isn't working
and why the one you suggest is.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en