From 312b3c8c057523b4b3a93e0f4b26a5a1731e7a49 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 17 Aug 2005 13:43:42 +0000 Subject: [PATCH] Error reply is kept separate from file type --- src/jalview/io/IdentifyFile.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index dbee007..65c0f70 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -42,6 +42,7 @@ public class IdentifyFile public static String Identify(String file, String protocol) { String reply = "PFAM"; + String error = "FILE NOT FOUND"; try { @@ -53,12 +54,11 @@ public class IdentifyFile } else if (protocol.equals("URL")) { - reply = "URL NOT FOUND"; - + error = "URL NOT FOUND"; URL url = new URL(file); reader = new BufferedReader(new InputStreamReader( url.openStream())); - reply = "error"; + } else if (protocol.equals("Paste")) { @@ -128,8 +128,8 @@ public class IdentifyFile catch (Exception ex) { System.err.println("File Identification failed!\n" + ex); + return error; } - return reply; } } -- 1.7.10.2