X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCommands.java;fp=src%2Fjalview%2Fbin%2FCommands.java;h=9cacc837471f45eac13647aa85ffa2b3798b9ac6;hp=b1b8288f3bb7220b352a1b7d4c4451320fa31143;hb=a36a254c3edbac394449bb7c9e01e2f93111ee30;hpb=e93bc0a7b2def06392a2f6b0f563c1e07fb917a1 diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index b1b8288..9cacc83 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -247,9 +247,24 @@ public class Commands Console.debug( "Opening '" + openFile + "' in new alignment frame"); FileLoader fileLoader = new FileLoader(!headless); - - af = fileLoader.LoadFileWaitTillLoaded(openFile, protocol, - format); + boolean xception=false; + try { + af = fileLoader.LoadFileWaitTillLoaded(openFile, protocol, + format); + } catch (Throwable thr) + { + xception=true; + Console.error("Couldn't open '"+openFile+"' as "+format+" "+thr.getLocalizedMessage()+ " (Enable debug for full stack trace)"); + Console.debug("Exception when opening '"+openFile+"'",thr); + } + finally + { + if (af==null && !xception) + { + Console.info("Ignoring '"+openFile+"' - no alignment data found."); + continue; + } + } // colour alignment? String colour = ArgParser.getFromSubValArgOrPref(avm, av,