From: jprocter Date: Thu, 11 Oct 2007 10:36:36 +0000 (+0000) Subject: pass up the errormessage in the exception when a datasource is not readable. X-Git-Tag: Release_2_4~246 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=feeacc1b8877e90b6b0cf0194849cb4344e987c4;p=jalview.git pass up the errormessage in the exception when a datasource is not readable. --- diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index f4f765c..9c05d5f 100755 --- a/src/jalview/io/FileParse.java +++ b/src/jalview/io/FileParse.java @@ -146,6 +146,11 @@ public class FileParse } } } + catch (Exception e) + { + errormessage = "CANNOT ACCESS DATA AT URL '"+fileStr+"' ("+e.getMessage()+")"; + error=true; + } } else if (type.equals(AppletFormatAdapter.PASTE)) { @@ -168,6 +173,11 @@ public class FileParse error = true; } } + if (dataIn==null) + { + // pass up the reason why we have no source to read from + throw new IOException("Failed to read data from source:\n"+errormessage); + } error=false; dataIn.mark(READAHEAD_LIMIT); }