From feeacc1b8877e90b6b0cf0194849cb4344e987c4 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 11 Oct 2007 10:36:36 +0000 Subject: [PATCH] pass up the errormessage in the exception when a datasource is not readable. --- src/jalview/io/FileParse.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); } -- 1.7.10.2