import java.awt.Color;
import java.io.BufferedReader;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import jalview.util.LaunchUtils;
import jalview.util.MessageManager;
import jalview.util.Platform;
+import jalview.util.UserAgent;
import jalview.ws.jws2.Jws2Discoverer;
/**
{
headless = true;
}
- System.setProperty("http.agent", HttpUtils.getUserAgent());
+ System.setProperty("http.agent", UserAgent.getUserAgent());
try
{
try
{
format = new IdentifyFile().identify(file, protocol);
- } catch (FileFormatException e1)
+ } catch (FileNotFoundException e)
{
- // TODO ?
+ Console.error("File at '" + file + "' not found", e);
+ } catch (FileFormatException e)
+ {
+ Console.error("File '" + file + "' format not recognised", e);
}
AlignFrame af = fileLoader.LoadFileWaitTillLoaded(file, protocol,
try
{
format = new IdentifyFile().identify(file, protocol);
+ } catch (FileNotFoundException e)
+ {
+ Console.error("File at '" + file + "' not found", e);
} catch (FileFormatException e)
{
- // TODO what?
+ Console.error("File '" + file + "' format not recognised", e);
}
}