X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FBrowserLauncher.java;h=cd9c969168d87dd7a05022d116b41b989526e9a1;hb=a23cc416cd520ac6dec6052591575b264f5d25bc;hp=a0f9523983a4ed7c9bea3ee58499803b6d62bcc9;hpb=47168f025aefdaa044802bd5f8f510ffe43a4808;p=jalview.git diff --git a/src/jalview/util/BrowserLauncher.java b/src/jalview/util/BrowserLauncher.java index a0f9523..cd9c969 100755 --- a/src/jalview/util/BrowserLauncher.java +++ b/src/jalview/util/BrowserLauncher.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -702,14 +702,14 @@ public class BrowserLauncher { if (!loadedWithoutErrors) { - throw new IOException("Exception in finding browser: " + errorMessage); + throw new IOException(MessageManager.formatMessage("exception.browser_not_found", new String[]{errorMessage})); } Object browser = locateBrowser(); if (browser == null) { - throw new IOException("Unable to locate browser: " + errorMessage); + throw new IOException(MessageManager.formatMessage("exception.browser_unable_to_locate", new String[]{errorMessage})); } switch (jvm) @@ -728,19 +728,13 @@ public class BrowserLauncher {}); } catch (InvocationTargetException ite) { - throw new IOException( - "InvocationTargetException while creating AEDesc: " - + ite.getMessage()); + throw new IOException(MessageManager.formatMessage("exception.invocation_target_exception_creating_aedesc", new String[]{ite.getMessage()})); } catch (IllegalAccessException iae) { - throw new IOException( - "IllegalAccessException while building AppleEvent: " - + iae.getMessage()); + throw new IOException(MessageManager.formatMessage("exception.illegal_access_building_apple_evt", new String[]{iae.getMessage()})); } catch (InstantiationException ie) { - throw new IOException( - "InstantiationException while creating AEDesc: " - + ie.getMessage()); + throw new IOException(MessageManager.formatMessage("exception.illegal_access_building_apple_evt", new String[]{ie.getMessage()})); } finally { aeDesc = null; // Encourage it to get disposed if it was created @@ -778,13 +772,12 @@ public class BrowserLauncher } else { - throw new IOException("Unable to launch URL: " + result); + throw new IOException(MessageManager.formatMessage("exception.unable_to_launch_url", new String[]{Integer.valueOf(result).toString()})); } } else { - throw new IOException( - "Unable to create an Internet Config instance: " + result); + throw new IOException(MessageManager.formatMessage("exception.unable_to_create_internet_config", new String[]{Integer.valueOf(result).toString()})); } break; @@ -797,14 +790,10 @@ public class BrowserLauncher { url }); } catch (InvocationTargetException ite) { - throw new IOException( - "InvocationTargetException while calling openURL: " - + ite.getMessage()); + throw new IOException(MessageManager.formatMessage("exception.invocation_target_calling_url", new String[]{ite.getMessage()})); } catch (IllegalAccessException iae) { - throw new IOException( - "IllegalAccessException while calling openURL: " - + iae.getMessage()); + throw new IOException(MessageManager.formatMessage("exception.illegal_access_calling_url", new String[]{iae.getMessage()})); } break; @@ -829,9 +818,7 @@ public class BrowserLauncher process.exitValue(); } catch (InterruptedException ie) { - throw new IOException( - "InterruptedException while launching browser: " - + ie.getMessage()); + throw new IOException(MessageManager.formatMessage("exception.interrupted_launching_browser", new String[]{ie.getMessage()})); } break; @@ -870,9 +857,7 @@ public class BrowserLauncher } } catch (InterruptedException ie) { - throw new IOException( - "InterruptedException while launching browser: " - + ie.getMessage()); + throw new IOException(MessageManager.formatMessage("exception.interrupted_launching_browser", new String[]{ie.getMessage()})); } break;