{
public void run()
{
- new AppJmol(pdbf, id, sq, alf.alignPanel, fileloc,
+ AppJmol sview=null;
+ try {
+ sview=new AppJmol(pdbf, id, sq, alf.alignPanel, fileloc,
+
rect, vid);
+ }
+ catch (OutOfMemoryError ex)
+ {
+ new OOMWarning("restoring structure view for PDB id "+id,(OutOfMemoryError) ex.getCause());
+ if (sview!=null && sview.isVisible())
+ {
+ sview.closeViewer();
+ sview.setVisible(false);
+ sview.dispose();
+ }
+ }
}
});
} catch (InvocationTargetException ex)
{
- System.err
- .println("Unexpected error when opening Jmol view.");
- ex.printStackTrace();
+ warn("Unexpected error when opening Jmol view.",ex);
+
} catch (InterruptedException e)
{
// e.printStackTrace();