diff --git a/framework/src/com/phonegap/FileTransfer.java b/framework/src/com/phonegap/FileTransfer.java index 24b181fb..4f6f0104 100644 --- a/framework/src/com/phonegap/FileTransfer.java +++ b/framework/src/com/phonegap/FileTransfer.java @@ -315,7 +315,13 @@ public class FileTransfer extends Plugin { //------------------ read the SERVER RESPONSE StringBuffer responseString = new StringBuffer(""); - DataInputStream inStream = new DataInputStream ( conn.getInputStream() ); + DataInputStream inStream; + try { + inStream = new DataInputStream ( conn.getInputStream() ); + } catch(FileNotFoundException e) { + throw new IOException("Received error from server"); + } + String line; while (( line = inStream.readLine()) != null) { responseString.append(line);