From: jprocter Date: Fri, 13 Nov 2009 11:22:33 +0000 (+0000) Subject: make fileparse errors easier to debug by dumping file parameter contents in debug... X-Git-Tag: Release_2_5~153 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4de388d1d73eb67fe9ccbfeb5f3483a0fe3052e8;p=jalview.git make fileparse errors easier to debug by dumping file parameter contents in debug mode. --- diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 7329a6f..f23cbde 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -672,6 +672,21 @@ public class JalviewLite extends Applet { dbgMsg("File load exception."); ex.printStackTrace(); + if (debug) { + try { + FileParse fp = new FileParse(file, protocol); + String ln = null; + dbgMsg(">>>Dumping contents of '"+file+"' "+"("+protocol+")"); + while ((ln=fp.nextLine())!=null) { + dbgMsg(ln); + } + dbgMsg(">>>Dump finished."); + } catch (Exception e) + { + System.err.println("Exception when trying to dump the content of the file parameter."); + e.printStackTrace(); + } + } } if ((al != null) && (al.getHeight() > 0)) {