Ignoring file not found exceptions
This commit is contained in:
parent
5068ee37e3
commit
891051df3c
1 changed files with 7 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ import com.ericsson.uecontrol.gui.util.Configurator.Configurable;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
|
|
@ -88,18 +89,20 @@ public class UeBehaviourSurfing extends UeBehaviour {
|
|||
|
||||
StringBuilder content = new StringBuilder();
|
||||
while ((read = in.read(data)) != -1) {
|
||||
if(stopExecution())
|
||||
if (stopExecution())
|
||||
return;
|
||||
totalRead += read;
|
||||
super.setProgress((float) totalRead / estimatedDataLength);
|
||||
super.setHandledIncomingData(read);
|
||||
if(cont.parsable)
|
||||
if (cont.parsable)
|
||||
content.append(new String(data, 0, read));
|
||||
if(content.length() > MAX_BUFFER_SIZE)
|
||||
if (content.length() > MAX_BUFFER_SIZE)
|
||||
break;
|
||||
}
|
||||
if(cont.parsable)
|
||||
if (cont.parsable)
|
||||
getAdditionalContent(cont.url, content.toString(), urlList);
|
||||
}catch(FileNotFoundException fnf){
|
||||
log.warn("Unable to download: "+urlList.get(i).url);
|
||||
}catch(IOException e){
|
||||
log.warn(null, e);
|
||||
if(retException == null) retException = e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue