X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=forester%2Fjava%2Fsrc%2Forg%2Fforester%2Farchaeopteryx%2FAptxUtil.java;h=c2dfc549b38b10317a3cae453db66a875bf4f554;hb=713d694ab9ab4e0701fd756af1ea2a892f96ade9;hp=1f7af119fdbb9fd9915f747f7feb8023a4d250bb;hpb=baa7e9117411d330ce57667fdc4a60086ef0951e;p=jalview.git diff --git a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java index 1f7af11..c2dfc54 100644 --- a/forester/java/src/org/forester/archaeopteryx/AptxUtil.java +++ b/forester/java/src/org/forester/archaeopteryx/AptxUtil.java @@ -21,7 +21,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // // Contact: phylosoft @ gmail . com -// WWW: www.phylosoft.org/forester +// WWW: https://sites.google.com/site/cmzmasek/home/software/forester package org.forester.archaeopteryx; @@ -949,7 +949,7 @@ public final class AptxUtil { final static void unexpectedError( final Error e ) { System.err.println(); - e.printStackTrace( System.err ); + e.printStackTrace( System.err ); System.err.println(); final StringBuffer sb = new StringBuffer(); for( final StackTraceElement s : e.getStackTrace() ) { @@ -958,39 +958,41 @@ public final class AptxUtil { JOptionPane .showMessageDialog( null, "An unexpected (possibly severe) error has occured - terminating. \nPlease contact: " - + Constants.AUTHOR_EMAIL + " \nError: " + e.getLocalizedMessage() + "\n" + sb, + + Constants.AUTHOR_EMAIL + " \nError: " + e.getLocalizedMessage() + "\n" + + sb, "Unexpected Severe Error [" + Constants.PRG_NAME + " " + Constants.VERSION + "]", JOptionPane.ERROR_MESSAGE ); System.exit( -1 ); } - + final static void outOfMemoryError( final OutOfMemoryError e ) { System.err.println(); System.err.println( "Java memory allocation might be too small, try \"-Xmx2048m\" java command line option" ); System.err.println(); e.printStackTrace(); System.err.println(); - - JOptionPane - .showMessageDialog( null, - "Java memory allocation might be too small, try \"-Xmx2048m\" java command line option" - + "\n\nError: " + e.getLocalizedMessage(), - "Out of Memory Error [" + Constants.PRG_NAME + " " + Constants.VERSION + "]", - JOptionPane.ERROR_MESSAGE ); + JOptionPane.showMessageDialog( null, + "Java memory allocation might be too small, try \"-Xmx2048m\" java command line option" + + "\n\nError: " + e.getLocalizedMessage(), + "Out of Memory Error [" + Constants.PRG_NAME + " " + Constants.VERSION + "]", + JOptionPane.ERROR_MESSAGE ); System.exit( -1 ); } final static void unexpectedException( final Exception e ) { System.err.println(); - e.printStackTrace( System.err ); + e.printStackTrace( System.err ); System.err.println(); final StringBuffer sb = new StringBuffer(); for( final StackTraceElement s : e.getStackTrace() ) { sb.append( s + "\n" ); } - JOptionPane.showMessageDialog( null, "An unexpected exception has occured. \nPlease contact: " - + Constants.AUTHOR_EMAIL + " \nException: " + e.getLocalizedMessage() + "\n" + sb, "Unexpected Exception [" - + Constants.PRG_NAME + Constants.VERSION + "]", JOptionPane.ERROR_MESSAGE ); + JOptionPane.showMessageDialog( null, + "An unexpected exception has occured. \nPlease contact: " + + Constants.AUTHOR_EMAIL + " \nException: " + e.getLocalizedMessage() + + "\n" + sb, + "Unexpected Exception [" + Constants.PRG_NAME + Constants.VERSION + "]", + JOptionPane.ERROR_MESSAGE ); } final static String writePhylogenyToGraphicsByteArrayOutputStream( final ByteArrayOutputStream baos,