X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FJabaParamStore.java;h=7c0eabd9858aef0a9485c96940fa14b29994fad2;hb=aced09c4feeaf3406269442c14e54abeeb4cad81;hp=65f939a8419c1a3500a421e8cc10657185099285;hpb=5d32c7ad007e098894b332b6fca61e1824972c50;p=jalview.git diff --git a/src/jalview/ws/jws2/JabaParamStore.java b/src/jalview/ws/jws2/JabaParamStore.java index 65f939a..7c0eabd 100644 --- a/src/jalview/ws/jws2/JabaParamStore.java +++ b/src/jalview/ws/jws2/JabaParamStore.java @@ -35,6 +35,7 @@ import compbio.metadata.Preset; import compbio.metadata.PresetManager; import compbio.metadata.RunnerConfig; +import jalview.util.MessageManager; import jalview.ws.jws2.dm.JabaOption; import jalview.ws.jws2.dm.JabaParameter; import jalview.ws.jws2.dm.JabaWsParamSet; @@ -166,9 +167,7 @@ public class JabaParamStore implements ParamDatastoreI } if (narg == null) { - throw new Error( - "Implementation Error: Cannot handle Jaba parameter object " - + rg.getClass()); + throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_handle_jaba_param", new String[]{rg.getClass().toString()})); } else { @@ -203,9 +202,7 @@ public class JabaParamStore implements ParamDatastoreI .getOption() : null; if (narg == null) { - throw new Error( - "Implementation Error: Cannot handle Jaba parameter object " - + rg.getClass()); + throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_handle_jaba_param", new String[]{rg.getClass().toString()})); } else { @@ -243,8 +240,7 @@ public class JabaParamStore implements ParamDatastoreI } if (servicePresets.containsKey(name)) { - throw new Error( - "Implementation error: Attempt to delete a service preset!"); + throw new Error(MessageManager.getString("error.implementation_error_attempt_to_delete_service_preset")); } } @@ -270,9 +266,7 @@ public class JabaParamStore implements ParamDatastoreI : getPreset(presetName)); if (jps == null) { - throw new Error("Implementation error: Can't locate either oldname (" - + oldName + ") or presetName (" + presetName - + "in the datastore!"); + throw new Error(MessageManager.formatMessage("error.implementation_error_cannot_locate_oldname_presetname", new String[]{oldName,presetName})); } jps.setName(presetName); jps.setDescription(text); @@ -322,8 +316,7 @@ public class JabaParamStore implements ParamDatastoreI { if (!involves(urls)) { - throw new IOException( - "Implementation error: Cannot find service url in the given url set!"); + throw new IOException(MessageManager.getString("error.implementation_error_cannot_find_service_url_in_given_set")); } JabaWsParamSet wsp = new JabaWsParamSet(); @@ -348,15 +341,11 @@ public class JabaParamStore implements ParamDatastoreI { if (!involves(pset.getApplicableUrls())) { - throw new IOException( - "Implementation error: Cannot find service url in the given url set for this service parameter store (" - + service.getUri() + ") !"); - + throw new IOException(MessageManager.formatMessage("error.implementation_error_cannot_find_service_url_in_given_set_param_store", new String[]{service.getUri()})); } if (!(pset instanceof JabaWsParamSet)) { - throw new Error( - "Implementation error: JabaWsParamSets can only be handled by JabaParamStore"); + throw new Error(MessageManager.getString("error.implementation_error_jabaws_param_set_only_handled_by")); } StringBuffer rslt = new StringBuffer();