Skip to content
Browse files

Non-sprint task - unified logging.

  • Loading branch information...
1 parent 067f3d8 commit b1c1198552e8ce4a36dd8e8b383d301c8c3c4f62 @MarkusTiede MarkusTiede committed Nov 16, 2012
Showing with 156 additions and 230 deletions.
  1. +2 −3 org.eclipse.jubula.app.cmd/src/org/eclipse/jubula/app/cmd/Client.java
  2. +5 −6 org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartAUTServerCommand.java
  3. +1 −2 org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/monitoring/AbstractMonitoring.java
  4. +3 −4 org.eclipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/ExtensionRegistry.java
  5. +3 −4 org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/XmlExporter.java
  6. +2 −3 org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/XmlImporter.java
  7. +8 −7 org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/XmlStorage.java
  8. +3 −4 org.eclipse.jubula.client.cmd/src/org/eclipse/jubula/client/cmd/AbstractCmdlineClient.java
  9. +19 −20 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTest.java
  10. +11 −12 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/MessageFactory.java
  11. +1 −2 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/ProjectNameBP.java
  12. +6 −7 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestExecution.java
  13. +1 −2 ...lient.core/src/org/eclipse/jubula/client/core/commands/DisconnectFromAutAgentResponseCommand.java
  14. +2 −3 ...lipse.jubula.client.core/src/org/eclipse/jubula/client/core/communication/AutAgentConnection.java
  15. +1 −2 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/Persistor.java
  16. +2 −3 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/BundleUtils.java
  17. +1 −2 ...nt.teststyle/src/org/eclipse/jubula/client/teststyle/propertytester/MarkerItemPropertyTester.java
  18. +2 −3 ...pse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/businessprocess/CompletenessBP.java
  19. +1 −2 ...eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/businessprocess/ProblemsBP.java
  20. +3 −4 ...clipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/businessprocess/ProjectUIBP.java
  21. +1 −2 ...bula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/TestExecutionContributor.java
  22. +1 −2 org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/AbstractJBEditor.java
  23. +1 −2 ...se.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AUTAgentConnectHandler.java
  24. +1 −2 ...se.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/NewViewInstanceHandler.java
  25. +2 −3 ...nt.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/OMEDeleteUnusedComponentNamesHandler.java
  26. +1 −2 ....jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/project/ExportAllHandler.java
  27. +1 −2 ...ula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/project/ExportProjectHandler.java
  28. +1 −2 ...ula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/project/SaveProjectAsHandler.java
  29. +1 −2 org.eclipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/wizards/ProjectWizard.java
  30. +1 −2 ...la.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/wizards/pages/ImportProjectsWizardPage.java
  31. +8 −9 ...eclipse.jubula.client.ui/src/org/eclipse/jubula/client/ui/businessprocess/SecurePreferenceBP.java
  32. +3 −4 ...la.client.ui/src/org/eclipse/jubula/client/ui/handlers/project/AbstractSelectDatabaseHandler.java
  33. +12 −13 org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/Communicator.java
  34. +1 −2 org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/connection/Connection.java
  35. +2 −3 org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/connection/GDSocket.java
  36. +3 −4 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
  37. +2 −3 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/adaptable/AdapterFactoryRegistry.java
  38. +7 −8 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/AbstractCapTestCommand.java
  39. +1 −2 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/TakeScreenshotCommand.java
  40. +4 −5 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/SwingAUTServer.java
  41. +2 −3 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java
  42. +1 −2 ...jubula.rc.swt/src/org/eclipse/jubula/rc/swt/commands/SendAUTListOfSupportedComponentsCommand.java
  43. +2 −3 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/AbstractAutSwtEventListener.java
  44. +4 −5 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/ComponentHandler.java
  45. +1 −2 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/FocusTracker.java
  46. +1 −2 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/MappingListener.java
  47. +7 −8 org.eclipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/utils/ToolkitUtils.java
  48. +2 −3 ...la.toolkit.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
  49. +0 −25 org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/constants/DebugConstants.java
  50. +1 −2 org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/i18n/CompSystemI18n.java
  51. +2 −3 org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/serialisation/SerializedImage.java
  52. +2 −3 org.eclipse.jubula.tools/src/org/eclipse/jubula/tools/utils/generator/AbstractComponentBuilder.java
View
5 org.eclipse.jubula.app.cmd/src/org/eclipse/jubula/app/cmd/Client.java
@@ -19,7 +19,6 @@
import org.eclipse.jubula.client.cmd.constants.ClientStrings;
import org.eclipse.jubula.client.cmd.i18n.Messages;
import org.eclipse.jubula.client.core.businessprocess.ClientTestStrings;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.CommunicationException;
import org.eclipse.jubula.tools.exception.JBFatalException;
@@ -86,10 +85,10 @@ public int doRun() {
log.error(e.getLocalizedMessage(), e);
printlnConsoleError(e.getMessage());
} catch (IllegalArgumentException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
printlnConsoleError(e.getMessage());
} catch (JBFatalException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
printlnConsoleError(e.getMessage());
} catch (Throwable t) {
log.error(ClientStrings.ERR_UNEXPECTED, t);
View
11 ...lipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/StartAUTServerCommand.java
@@ -18,7 +18,6 @@
import org.eclipse.jubula.communication.message.StartAUTServerMessage;
import org.eclipse.jubula.communication.message.StartAUTServerStateMessage;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -116,27 +115,27 @@ public Message execute() {
return autStarter.startAut(m_message.getAutConfiguration());
} catch (IllegalArgumentException iae) {
- log.error(DebugConstants.ERROR, iae);
+ log.error(iae.getLocalizedMessage(), iae);
return new StartAUTServerStateMessage(
StartAUTServerStateMessage.EXECUTION,
iae.getMessage());
} catch (NullPointerException npe) {
- log.error(DebugConstants.ERROR, npe);
+ log.error(npe.getLocalizedMessage(), npe);
return new StartAUTServerStateMessage(
StartAUTServerStateMessage.DATA,
npe.getMessage());
} catch (SecurityException se) {
- log.error("security violation", se); //$NON-NLS-1$
+ log.error(se.getLocalizedMessage(), se);
return new StartAUTServerStateMessage(
StartAUTServerStateMessage.SECURITY,
"security violation:" + se.getMessage()); //$NON-NLS-1$
} catch (IOException ioe) {
- log.error("could not start AUTServer", ioe); //$NON-NLS-1$
+ log.error("Could not start AUTServer", ioe); //$NON-NLS-1$
return new StartAUTServerStateMessage(
StartAUTServerStateMessage.IO,
ioe.getMessage());
} catch (ClassNotFoundException cnfe) {
- log.error("could not find class for AUTServer", cnfe); //$NON-NLS-1$
+ log.error("Could not find class for AUTServer", cnfe); //$NON-NLS-1$
return new StartAUTServerStateMessage(
StartAUTServerStateMessage.NO_SERVER_CLASS,
cnfe.getMessage());
View
3 ...clipse.jubula.autagent/src/org/eclipse/jubula/autagent/monitoring/AbstractMonitoring.java
@@ -16,7 +16,6 @@
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.objects.IMonitoringValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -56,7 +55,7 @@ public void writeMonitoringReport(OutputStream out) {
try {
out.close();
} catch (IOException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
}
View
7 ...clipse.jubula.client.analyze/src/org/eclipse/jubula/client/analyze/ExtensionRegistry.java
@@ -27,7 +27,6 @@
import org.eclipse.jubula.client.analyze.internal.Category;
import org.eclipse.jubula.client.analyze.internal.Context;
import org.eclipse.jubula.client.analyze.internal.Renderer;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -216,7 +215,7 @@ private static void handleAnalyze(IConfigurationElement analyzeConfig) {
analyzeMap.put(analyzeConfig.getAttribute(AnalyzeConstants.ANA_ID),
ana);
} catch (CoreException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
@@ -245,7 +244,7 @@ private static void handleResultRenderer(
rendererConfig.getAttribute(AnalyzeConstants.RENDERER_ID),
renderer);
} catch (CoreException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
@@ -288,7 +287,7 @@ private static void handleContexts(IConfigurationElement contextConfig) {
contextConfig.getAttribute(AnalyzeConstants.CONTEXT_ID),
context);
} catch (CoreException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
View
7 org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/XmlExporter.java
@@ -112,7 +112,6 @@
import org.eclipse.jubula.client.core.persistence.PMException;
import org.eclipse.jubula.client.core.persistence.PMSaveException;
import org.eclipse.jubula.client.core.persistence.TestResultSummaryPM;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.ProjectDeletedException;
import org.eclipse.jubula.tools.messagehandling.MessageIDs;
@@ -580,11 +579,11 @@ private void fillTestResultSummary(Project xml, IProjectPO po)
}
xmlSummaryAttribute.setType(pType.getName());
} catch (NoSuchMethodException e) {
- log.warn(DebugConstants.ERROR, e);
+ log.warn(e.getLocalizedMessage(), e);
} catch (IllegalAccessException e) {
- log.warn(DebugConstants.ERROR, e);
+ log.warn(e.getLocalizedMessage(), e);
} catch (InvocationTargetException e) {
- log.warn(DebugConstants.ERROR, e);
+ log.warn(e.getLocalizedMessage(), e);
}
}
Map<String, IMonitoringValue>
View
5 org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/XmlImporter.java
@@ -133,7 +133,6 @@
import org.eclipse.jubula.client.core.utils.TreeTraverser;
import org.eclipse.jubula.toolkit.common.xml.businessprocess.ComponentBuilder;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.Assert;
import org.eclipse.jubula.tools.exception.InvalidDataException;
@@ -954,9 +953,9 @@ private void initTestResultSummaries(
BEAN_UTILS.setProperty(summary,
propertyNameToSet, sa.getValue());
} catch (IllegalAccessException e) {
- log.warn(DebugConstants.ERROR, e);
+ log.warn(e.getLocalizedMessage(), e);
} catch (InvocationTargetException e) {
- log.warn(DebugConstants.ERROR, e);
+ log.warn(e.getLocalizedMessage(), e);
}
}
} else {
View
15 org.eclipse.jubula.client.archive/src/org/eclipse/jubula/client/archive/XmlStorage.java
@@ -46,7 +46,6 @@
import org.eclipse.jubula.client.core.persistence.PMReadException;
import org.eclipse.jubula.client.core.persistence.PMSaveException;
import org.eclipse.jubula.client.core.progress.IProgressConsole;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.InvalidDataException;
import org.eclipse.jubula.tools.exception.JBVersionException;
@@ -225,9 +224,10 @@ private static String save(IProjectPO project,
msgs.append(msg);
}
if (log.isDebugEnabled()) {
- log.debug(Messages.ValidateFailed + StringConstants.COLON);
- log.debug(DebugConstants.ERROR, msgs);
- log.debug(DebugConstants.ERROR, contentDoc);
+ log.debug(Messages.ValidateFailed
+ + StringConstants.COLON, msgs);
+ log.debug(Messages.ValidateFailed
+ + StringConstants.COLON, contentDoc);
}
throw new PMSaveException(
"XML" + Messages.ValidateFailed + msgs.toString(), //$NON-NLS-1$
@@ -443,9 +443,10 @@ private static ContentDocument getContent(String xmlString)
msgs.append(msg);
}
if (log.isDebugEnabled()) {
- log.debug(Messages.ValidateFailed + StringConstants.COLON);
- log.debug(DebugConstants.ERROR, msgs);
- log.debug(DebugConstants.ERROR, contentDoc);
+ log.debug(Messages.ValidateFailed
+ + StringConstants.COLON, msgs);
+ log.debug(Messages.ValidateFailed
+ + StringConstants.COLON, contentDoc);
}
throw new PMReadException(Messages.InvalidImportFile
+ msgs.toString(), MessageIDs.E_LOAD_PROJECT);
View
7 org.eclipse.jubula.client.cmd/src/org/eclipse/jubula/client/cmd/AbstractCmdlineClient.java
@@ -47,7 +47,6 @@
import org.eclipse.jubula.client.core.preferences.database.PostGreSQLConnectionInfo;
import org.eclipse.jubula.client.core.progress.IProgressConsole;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.JBException;
import org.eclipse.jubula.tools.messagehandling.Message;
@@ -396,10 +395,10 @@ public void showErrorMessage(Integer messageID, Object[] params,
return EXIT_CODE_ERROR;
}
} catch (ParseException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
return EXIT_CODE_ERROR;
} catch (IOException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
return EXIT_CODE_ERROR;
}
preRun();
@@ -417,7 +416,7 @@ public void showErrorMessage(Integer messageID, Object[] params,
// Assume that, if an exception has bubbled up this far, then it is
// a big enough problem to warrant telling the user and returning a
// generic error exit code.
- log.error(DebugConstants.ERROR, t);
+ log.error(t.getLocalizedMessage(), t);
printlnConsoleError(t.getLocalizedMessage());
return EXIT_CODE_ERROR;
}
View
39 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/ClientTest.java
@@ -100,7 +100,6 @@
import org.eclipse.jubula.toolkit.common.monitoring.MonitoringRegistry;
import org.eclipse.jubula.toolkit.common.xml.businessprocess.ComponentBuilder;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.InputConstants;
import org.eclipse.jubula.tools.constants.MonitoringConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
@@ -281,20 +280,20 @@ public void startAut(IAUTMainPO aut, IAUTConfigPO conf, Locale locale)
// initialising the server, so there must be a shutdown(). The
// listeners are already notified from the ConnectionListener of
// the AutAgentConnection, -> just log.
- log.info(DebugConstants.ERROR, nce);
+ log.info(nce.getLocalizedMessage(), nce);
} catch (ConnectionException ce) {
// This exception is thrown from AutAgentConnection.getInstance(). See comment above.
- log.info(DebugConstants.ERROR, ce);
+ log.info(ce.getLocalizedMessage(), ce);
} catch (CommunicationException cce) {
- log.error(DebugConstants.ERROR, cce);
+ log.error(cce.getLocalizedMessage(), cce);
// message could not send for any reason, close the connections
try {
closeConnections();
} catch (ConnectionException ce) {
log.error(Messages.ClosingTheConnectionsFailed, ce);
}
} catch (UnknownHostException uhe) {
- log.error(DebugConstants.ERROR, uhe);
+ log.error(uhe.getLocalizedMessage(), uhe);
try {
// from InetAdress.getLocalHost().getName(), should not occur
// -> no communication possible -> close the connections as a
@@ -475,11 +474,11 @@ public void startRecordTestCase(ISpecTestCasePO spec,
} catch (UnknownMessageException ume) {
fireAUTServerStateChanged(new AUTServerEvent(ume.getErrorId()));
} catch (NotConnectedException nce) {
- log.error(DebugConstants.ERROR, nce);
- // HERE: notify the listeners about unsuccessfull mode change
+ log.error(nce.getLocalizedMessage(), nce);
+ // HERE: notify the listeners about unsuccessful mode change
} catch (CommunicationException ce) {
- log.error(DebugConstants.ERROR, ce);
- // HERE: notify the listeners about unsuccessfull mode change
+ log.error(ce.getLocalizedMessage(), ce);
+ // HERE: notify the listeners about unsuccessful mode change
}
}
@@ -502,12 +501,12 @@ public void resetToTesting() {
fireAUTServerStateChanged(new AUTServerEvent(
ume.getErrorId()));
} catch (NotConnectedException nce) {
- log.error(DebugConstants.ERROR, nce);
- // HERE: notify the listeners about unsuccessfull mode
+ log.error(nce.getLocalizedMessage(), nce);
+ // HERE: notify the listeners about unsuccessful mode
// change
} catch (CommunicationException ce) {
- log.error(DebugConstants.ERROR, ce);
- // HERE: notify the listeners about unsuccessfull mode
+ log.error(ce.getLocalizedMessage(), ce);
+ // HERE: notify the listeners about unsuccessful mode
// change
}
AUTConnection.getInstance().close();
@@ -979,9 +978,9 @@ public void getMonitoringData() {
try {
AutAgentConnection.getInstance().send(message);
} catch (NotConnectedException nce) {
- log.error(DebugConstants.ERROR, nce);
+ log.error(nce.getLocalizedMessage(), nce);
} catch (CommunicationException ce) {
- log.error(DebugConstants.ERROR, ce);
+ log.error(ce.getLocalizedMessage(), ce);
}
}
@@ -998,9 +997,9 @@ public void buildMonitoringReport() {
try {
AutAgentConnection.getInstance().send(message);
} catch (NotConnectedException nce) {
- log.error(DebugConstants.ERROR, nce);
+ log.error(nce.getLocalizedMessage(), nce);
} catch (CommunicationException ce) {
- log.error(DebugConstants.ERROR, ce);
+ log.error(ce.getLocalizedMessage(), ce);
}
}
@@ -1029,9 +1028,9 @@ public void run() {
}
autConfigMap = response.getAutConfigMap();
} catch (NotConnectedException nce) {
- log.error(DebugConstants.ERROR, nce);
+ log.error(nce.getLocalizedMessage(), nce);
} catch (CommunicationException ce) {
- log.error(DebugConstants.ERROR, ce);
+ log.error(ce.getLocalizedMessage(), ce);
}
return autConfigMap;
}
@@ -1323,7 +1322,7 @@ private boolean initServerConnection(String serverName, String port)
} catch (BaseConnection.AlreadyConnectedException ae) {
// The connection is already established.
if (log.isDebugEnabled()) {
- log.debug(DebugConstants.ERROR, ae);
+ log.debug(ae.getLocalizedMessage(), ae);
}
return false;
}
View
23 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/MessageFactory.java
@@ -23,7 +23,6 @@
import org.eclipse.jubula.communication.message.MessageCap;
import org.eclipse.jubula.communication.message.SendAUTListOfSupportedComponentsMessage;
import org.eclipse.jubula.tools.constants.CommandConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.messagehandling.MessageIDs;
import org.slf4j.Logger;
@@ -126,39 +125,39 @@ public static ActivateApplicationMessage getActivateApplicationMessage()
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (ExceptionInInitializerError eiie) {
- LOG.error(DebugConstants.ERROR, eiie);
+ LOG.error(eiie.getLocalizedMessage(), eiie);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + eiie.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (LinkageError le) {
- LOG.error(DebugConstants.ERROR, le);
+ LOG.error(le.getLocalizedMessage(), le);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + le.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (ClassNotFoundException cnfe) {
- LOG.error(DebugConstants.ERROR, cnfe);
+ LOG.error(cnfe.getLocalizedMessage(), cnfe);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + cnfe.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (InstantiationException ie) {
- LOG.error(DebugConstants.ERROR, ie);
+ LOG.error(ie.getLocalizedMessage(), ie);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + ie.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (IllegalAccessException iae) {
- LOG.error(DebugConstants.ERROR, iae);
+ LOG.error(iae.getLocalizedMessage(), iae);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
@@ -254,7 +253,7 @@ public static CAPTestMessage getCAPTestMessage(MessageCap messageCap)
private static void throwUnknownMessageException(String messageClassName,
Throwable nestedException)
throws UnknownMessageException {
- LOG.error(DebugConstants.ERROR, nestedException);
+ LOG.error(nestedException.getLocalizedMessage(), nestedException);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
@@ -302,39 +301,39 @@ private static void throwUnknownMessageException(String messageClassName,
.newInstance();
return result;
} catch (ExceptionInInitializerError eiie) {
- LOG.error(DebugConstants.ERROR, eiie);
+ LOG.error(eiie.getLocalizedMessage(), eiie);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + eiie.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (LinkageError le) {
- LOG.error(DebugConstants.ERROR, le);
+ LOG.error(le.getLocalizedMessage(), le);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + le.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (ClassNotFoundException cnfe) {
- LOG.error(DebugConstants.ERROR, cnfe);
+ LOG.error(cnfe.getLocalizedMessage(), cnfe);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + cnfe.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (InstantiationException ie) {
- LOG.error(DebugConstants.ERROR, ie);
+ LOG.error(ie.getLocalizedMessage(), ie);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
+ Messages.Failed + StringConstants.COLON
+ StringConstants.SPACE + ie.getMessage(),
MessageIDs.E_MESSAGE_NOT_CREATED);
} catch (IllegalAccessException iae) {
- LOG.error(DebugConstants.ERROR, iae);
+ LOG.error(iae.getLocalizedMessage(), iae);
throw new UnknownMessageException(
Messages.CreatingAnMessageSharedInstanceFor
+ StringConstants.SPACE + messageClassName
View
3 ....jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/ProjectNameBP.java
@@ -28,7 +28,6 @@
import org.eclipse.jubula.client.core.persistence.PersistenceManager;
import org.eclipse.jubula.client.core.persistence.Persistor;
import org.eclipse.jubula.client.core.utils.NameValidationUtil;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.JBFatalException;
import org.eclipse.jubula.tools.exception.ProjectDeletedException;
@@ -96,7 +95,7 @@ public String getName(String guid, boolean useCache) {
try {
res = readProjectNameFromDB(guid);
} catch (PMException e) {
- log.warn(DebugConstants.ERROR, e);
+ log.warn(e.getLocalizedMessage(), e);
}
}
View
13 ....jubula.client.core/src/org/eclipse/jubula/client/core/businessprocess/TestExecution.java
@@ -84,7 +84,6 @@
import org.eclipse.jubula.communication.message.TakeScreenshotMessage;
import org.eclipse.jubula.toolkit.common.xml.businessprocess.ComponentBuilder;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.MonitoringConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.constants.TimeoutConstants;
@@ -1004,11 +1003,11 @@ private void addScreenshot(TestResultNode resultNode) {
TimeoutConstants.CLIENT_SERVER_TIMEOUT_TAKE_SCREENSHOT);
} catch (NotConnectedException nce) {
if (LOG.isErrorEnabled()) {
- LOG.error(DebugConstants.ERROR, nce);
+ LOG.error(nce.getLocalizedMessage(), nce);
}
} catch (CommunicationException ce) {
if (LOG.isErrorEnabled()) {
- LOG.error(DebugConstants.ERROR, ce);
+ LOG.error(ce.getLocalizedMessage(), ce);
}
}
}
@@ -1207,9 +1206,9 @@ private void resetMonitoringData(Map<String, String> autConfigMap,
.getExecutableName());
AutAgentConnection.getInstance().send(message);
} catch (NotConnectedException nce) {
- LOG.error(DebugConstants.ERROR, nce);
+ LOG.error(nce.getLocalizedMessage(), nce);
} catch (CommunicationException ce) {
- LOG.error(DebugConstants.ERROR, ce);
+ LOG.error(ce.getLocalizedMessage(), ce);
}
}
}
@@ -1228,12 +1227,12 @@ public void endTestExecution() {
EndTestExecutionMessage.TIMEOUT);
} catch (NotConnectedException nce) {
if (LOG.isWarnEnabled()) {
- LOG.warn(DebugConstants.ERROR, nce);
+ LOG.warn(nce.getLocalizedMessage(), nce);
}
stopExecution();
} catch (CommunicationException ce) {
if (LOG.isWarnEnabled()) {
- LOG.warn(DebugConstants.ERROR, ce);
+ LOG.warn(ce.getLocalizedMessage(), ce);
}
stopExecution();
}
View
3 ...re/src/org/eclipse/jubula/client/core/commands/DisconnectFromAutAgentResponseCommand.java
@@ -16,7 +16,6 @@
import org.eclipse.jubula.communication.ICommand;
import org.eclipse.jubula.communication.message.DisconnectFromAutAgentResponseMessage;
import org.eclipse.jubula.communication.message.Message;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -53,7 +52,7 @@ public Message execute() {
AutAgentConnection.getInstance().close();
} catch (ConnectionException e) {
if (log.isInfoEnabled()) {
- log.info(DebugConstants.ERROR, e);
+ log.info(e.getLocalizedMessage(), e);
}
}
return null;
View
5 ...bula.client.core/src/org/eclipse/jubula/client/core/communication/AutAgentConnection.java
@@ -20,7 +20,6 @@
import org.eclipse.jubula.communication.Communicator;
import org.eclipse.jubula.communication.listener.ICommunicationErrorListener;
import org.eclipse.jubula.communication.message.Message;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.messagehandling.MessageIDs;
import org.slf4j.Logger;
@@ -91,7 +90,7 @@ public static synchronized void createInstance(String serverName,
new Integer(port).intValue());
} catch (UnknownHostException uhe) {
// log on info level, the configuration may be bad typed
- log.info(DebugConstants.ERROR, uhe);
+ log.info(uhe.getLocalizedMessage(), uhe);
throw new ConnectionException(uhe.getMessage(),
MessageIDs.E_UNKNOWN_HOST);
}
@@ -158,7 +157,7 @@ public void shutDown() {
} catch (ConnectionException ce) {
// the connection to the AUTServer is not established
// -> just log this
- log.debug(DebugConstants.ERROR, ce);
+ log.debug(ce.getLocalizedMessage(), ce);
}
}
View
3 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/persistence/Persistor.java
@@ -53,7 +53,6 @@
import org.eclipse.jubula.client.core.utils.DatabaseStateDispatcher;
import org.eclipse.jubula.client.core.utils.DatabaseStateEvent;
import org.eclipse.jubula.client.core.utils.DatabaseStateEvent.DatabaseState;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.JBException;
import org.eclipse.jubula.tools.exception.JBFatalAbortException;
@@ -240,7 +239,7 @@ public void done(IJobChangeEvent event) {
try {
connectToDBJob.join();
} catch (InterruptedException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
connectionGained.set(false);
}
View
5 org.eclipse.jubula.client.core/src/org/eclipse/jubula/client/core/utils/BundleUtils.java
@@ -18,7 +18,6 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.jubula.client.core.i18n.Messages;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.JBFatalException;
import org.eclipse.jubula.tools.messagehandling.MessageIDs;
@@ -61,9 +60,9 @@ public static URL getFileURL(Bundle bundle, String resouceName) {
+ StringConstants.SPACE + resouceName + StringConstants.SPACE
+ Messages.NotFound + StringConstants.DOT);
} catch (MalformedURLException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
} catch (IOException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return null;
}
View
3 ...tyle/src/org/eclipse/jubula/client/teststyle/propertytester/MarkerItemPropertyTester.java
@@ -14,7 +14,6 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jubula.client.teststyle.constants.Ext;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.ui.views.markers.MarkerItem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +49,7 @@ public boolean test(Object receiver, String property, Object[] args,
? true : false;
}
} catch (CoreException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
boolean expectedBoolean = expectedValue instanceof Boolean
? ((Boolean)expectedValue).booleanValue() : true;
View
5 ...la.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/businessprocess/CompletenessBP.java
@@ -28,7 +28,6 @@
import org.eclipse.jubula.client.core.persistence.GeneralStorage;
import org.eclipse.jubula.client.ui.rcp.Plugin;
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
@@ -126,9 +125,9 @@ public void completeProjectCheck() {
PlatformUI.getWorkbench().getProgressService().run(true, false,
new UICompletenessCheckOperation());
} catch (InvocationTargetException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
} catch (InterruptedException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
} finally {
Plugin.stopLongRunning();
}
View
3 ...jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/businessprocess/ProblemsBP.java
@@ -68,7 +68,6 @@
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
import org.eclipse.jubula.client.ui.rcp.utils.Utils;
import org.eclipse.jubula.tools.constants.AutConfigConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.JBException;
import org.eclipse.jubula.tools.i18n.CompSystemI18n;
@@ -603,7 +602,7 @@ private void createMarker(String message, int messageType,
m_markerList.add(marker);
m_markerToShowList.add(marker);
} catch (CoreException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
View
7 ...ubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/businessprocess/ProjectUIBP.java
@@ -17,7 +17,6 @@
import org.eclipse.jubula.client.ui.constants.Constants;
import org.eclipse.jubula.client.ui.rcp.Plugin;
import org.eclipse.jubula.client.ui.rcp.dialogs.ProjectDialog.ProjectData;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -83,7 +82,7 @@ public static ProjectData getMostRecentProjectData() {
StringConstants.EMPTY));
} catch (StorageException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
}
return projectData;
@@ -104,10 +103,10 @@ public void saveMostRecentProjectData(
node.put(Constants.MOST_RECENT_PROJECTDATA_VERSION_KEY,
projectData.getVersionString(), true);
} catch (StorageException e1) {
- LOG.error(DebugConstants.ERROR, e1);
+ LOG.error(e1.getLocalizedMessage(), e1);
}
} else {
- LOG.error(DebugConstants.ERROR);
+ LOG.error("Node not found");
}
}
View
3 ...ent.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/controllers/TestExecutionContributor.java
@@ -53,7 +53,6 @@
import org.eclipse.jubula.client.ui.utils.ErrorHandlingUtil;
import org.eclipse.jubula.client.ui.utils.JobUtils;
import org.eclipse.jubula.communication.message.ChangeAUTModeMessage;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.constants.TimingConstantsClient;
import org.eclipse.jubula.tools.exception.Assert;
@@ -804,7 +803,7 @@ public void endTestExecution() {
AUTConnection.getInstance().getCommunicator()
.interruptAllTimeouts();
} catch (ConnectionException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
setClientMinimized(false);
}
View
3 ...e.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/editors/AbstractJBEditor.java
@@ -47,7 +47,6 @@
import org.eclipse.jubula.client.ui.utils.LayoutUtil;
import org.eclipse.jubula.client.ui.views.IJBPart;
import org.eclipse.jubula.client.ui.views.ITreeViewerContainer;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -481,7 +480,7 @@ protected void handlePMCompNameException(IncompatibleTypeException pmce) {
try {
ComponentNamesBP.getInstance().init();
} catch (PMException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
ErrorHandlingUtil.createMessageDialog(e, null, null);
}
}
View
3 ...a.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/AUTAgentConnectHandler.java
@@ -18,7 +18,6 @@
import org.eclipse.jubula.client.ui.rcp.businessprocess.ConnectAutAgentBP;
import org.eclipse.jubula.client.ui.rcp.controllers.TestExecutionGUIController;
import org.eclipse.jubula.client.ui.rcp.utils.AutAgentManager.AutAgent;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.ui.commands.IElementUpdater;
import org.eclipse.ui.menus.UIElement;
@@ -56,7 +55,7 @@ public Object executeImpl(ExecutionEvent event) throws ExecutionException {
AutAgent autAgent = new AutAgent(name, portNo);
TestExecutionGUIController.connectToAutAgent(autAgent);
} catch (Exception e) {
- throw new ExecutionException(DebugConstants.ERROR, e);
+ throw new ExecutionException(e.getLocalizedMessage(), e);
}
return null;
}
View
3 ...a.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/NewViewInstanceHandler.java
@@ -14,7 +14,6 @@
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jubula.client.ui.constants.Constants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
@@ -40,7 +39,7 @@ public Object execute(ExecutionEvent event) throws ExecutionException {
SECONDARY_ID_PREFIX + System.currentTimeMillis(),
IWorkbenchPage.VIEW_ACTIVATE);
} catch (PartInitException e) {
- new ExecutionException(DebugConstants.ERROR, e);
+ new ExecutionException(e.getLocalizedMessage(), e);
}
return null;
}
View
5 ...p/src/org/eclipse/jubula/client/ui/rcp/handlers/OMEDeleteUnusedComponentNamesHandler.java
@@ -35,7 +35,6 @@
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
import org.eclipse.jubula.client.ui.rcp.provider.contentprovider.objectmapping.OMEditorTreeContentProvider;
import org.eclipse.jubula.client.ui.rcp.search.query.ShowResponsibleNodeForComponentName;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -183,9 +182,9 @@ public void run() {
}
});
} catch (InvocationTargetException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
} catch (InterruptedException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return null;
}
View
3 ...client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/project/ExportAllHandler.java
@@ -29,7 +29,6 @@
import org.eclipse.jubula.client.ui.rcp.businessprocess.ExportAllBP;
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
import org.eclipse.jubula.client.ui.rcp.utils.Utils;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.exception.JBException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -164,7 +163,7 @@ private void showExportDialog() {
.busyCursorWhile(op);
} catch (InvocationTargetException ite) {
// Exception occurred during operation
- log.error(DebugConstants.ERROR, ite.getCause());
+ log.error(ite.getLocalizedMessage(), ite.getCause());
} catch (InterruptedException ie) {
// Operation was canceled. This is already handled by the
// operation. Do nothing.
View
3 ...nt.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/project/ExportProjectHandler.java
@@ -28,7 +28,6 @@
import org.eclipse.jubula.client.ui.rcp.i18n.Messages;
import org.eclipse.jubula.client.ui.rcp.utils.Utils;
import org.eclipse.jubula.client.ui.utils.ErrorHandlingUtil;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.exception.ProjectDeletedException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -150,7 +149,7 @@ private void showExportDialog() {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(op);
} catch (InvocationTargetException ite) {
// Exception occurred during operation
- log.error(DebugConstants.ERROR, ite.getCause());
+ log.error(ite.getLocalizedMessage(), ite.getCause());
} catch (InterruptedException ie) {
// Operation canceled.
// Do nothing.
View
3 ...nt.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/handlers/project/SaveProjectAsHandler.java
@@ -48,7 +48,6 @@
import org.eclipse.jubula.client.ui.rcp.utils.Utils;
import org.eclipse.jubula.client.ui.utils.DialogUtils;
import org.eclipse.jubula.client.ui.utils.ErrorHandlingUtil;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.exception.JBVersionException;
import org.eclipse.jubula.tools.exception.ProjectDeletedException;
import org.eclipse.jubula.tools.jarutils.IVersion;
@@ -343,7 +342,7 @@ public Object executeImpl(ExecutionEvent event) {
fireReady();
} catch (InvocationTargetException ite) {
// Exception occurred during operation
- log.error(DebugConstants.ERROR, ite.getCause());
+ log.error(ite.getLocalizedMessage(), ite.getCause());
} catch (InterruptedException e) {
// Operation was canceled.
// We have to clear the GUI because all of
View
3 ...ipse.jubula.client.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/wizards/ProjectWizard.java
@@ -46,7 +46,6 @@
import org.eclipse.jubula.client.ui.rcp.wizards.pages.ProjectSettingWizardPage;
import org.eclipse.jubula.client.ui.utils.ErrorHandlingUtil;
import org.eclipse.jubula.toolkit.common.xml.businessprocess.ComponentBuilder;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.JBException;
import org.eclipse.jubula.tools.exception.ProjectDeletedException;
@@ -169,7 +168,7 @@ public void run(IProgressMonitor monitor)
});
} catch (InvocationTargetException ite) {
// Exception occurred during operation
- log.error(DebugConstants.ERROR, ite.getCause());
+ log.error(ite.getLocalizedMessage(), ite.getCause());
} catch (InterruptedException ie) {
// Operation was canceled.
// Do nothing.
View
3 ...t.ui.rcp/src/org/eclipse/jubula/client/ui/rcp/wizards/pages/ImportProjectsWizardPage.java
@@ -28,7 +28,6 @@
import org.eclipse.jubula.client.ui.rcp.utils.Utils;
import org.eclipse.jubula.client.ui.utils.DialogUtils;
import org.eclipse.jubula.client.ui.utils.LayoutUtil;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -397,7 +396,7 @@ void checkCompletness() {
try {
m_fileURLs.add(new File(fileName).toURI().toURL());
} catch (MalformedURLException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
View
17 ...jubula.client.ui/src/org/eclipse/jubula/client/ui/businessprocess/SecurePreferenceBP.java
@@ -21,7 +21,6 @@
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
import org.eclipse.equinox.security.storage.StorageException;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -199,7 +198,7 @@ public void saveProfile(String profileName, String userName) {
node.put(Constants.SECURE_STORAGE_USERNAME_KEY, userName,
false);
} catch (StorageException e1) {
- LOG.error(DebugConstants.ERROR, e1);
+ LOG.error(e1.getLocalizedMessage(), e1);
}
}
}
@@ -215,7 +214,7 @@ public void saveProfilePassword(String profileName, String password) {
try {
node.put(Constants.SECURE_STORAGE_PASSWORD_KEY, password, true);
} catch (StorageException e2) {
- LOG.error(DebugConstants.ERROR, e2);
+ LOG.error(e2.getLocalizedMessage(), e2);
}
}
}
@@ -246,7 +245,7 @@ private void renameProfile(String oldProfileName, String newProfileName) {
// rename secure storage
ISecurePreferences root = SecurePreferencesFactory.getDefault();
if (root == null) {
- LOG.error(DebugConstants.ERROR);
+ LOG.error("No root node found");
}
if (oldProfileName != null) {
ISecurePreferences node = root
@@ -259,14 +258,14 @@ private void renameProfile(String oldProfileName, String newProfileName) {
node.put(Constants.SECURE_STORAGE_USERNAME_KEY, userName,
false);
} catch (StorageException e1) {
- LOG.error(DebugConstants.ERROR, e1);
+ LOG.error(e1.getLocalizedMessage(), e1);
}
if (isSaveCredentialsActive(oldProfileName)) {
try {
node.put(Constants.SECURE_STORAGE_PASSWORD_KEY, password,
true);
} catch (StorageException e2) {
- LOG.error(DebugConstants.ERROR, e2);
+ LOG.error(e2.getLocalizedMessage(), e2);
}
}
// rename preference store
@@ -336,7 +335,7 @@ public String getUserName(String profileName) {
StringConstants.EMPTY);
} catch (StorageException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return userName;
}
@@ -361,7 +360,7 @@ public String getPassword(String profileName) {
StringConstants.EMPTY);
} catch (StorageException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
return dbPwd;
}
@@ -403,7 +402,7 @@ private ISecurePreferences getNodeForProfile(String profileName) {
ISecurePreferences root = SecurePreferencesFactory.getDefault();
ISecurePreferences node = root;
if (root == null) {
- LOG.error(DebugConstants.ERROR);
+ LOG.error("No root node found");
} else if (profileName != null) {
node = root
.node(getSecureStorageProfilePath(profileName));
View
7 ...t.ui/src/org/eclipse/jubula/client/ui/handlers/project/AbstractSelectDatabaseHandler.java
@@ -36,7 +36,6 @@
import org.eclipse.jubula.client.ui.handlers.AbstractHandler;
import org.eclipse.jubula.client.ui.i18n.Messages;
import org.eclipse.jubula.client.ui.utils.DialogUtils;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.eclipse.ui.PlatformUI;
@@ -110,7 +109,7 @@ public Object executeImpl(ExecutionEvent event) {
try {
returnStatus = connectToDatabase(userName, pwd, dbInfo);
} catch (InterruptedException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
while (performLogin && returnStatus == null) {
@@ -279,7 +278,7 @@ public void run(IProgressMonitor monitor) {
});
} catch (InvocationTargetException ite) {
// Exception occurred during operation
- log.error(DebugConstants.ERROR, ite.getCause());
+ log.error(ite.getLocalizedMessage(), ite.getCause());
} catch (InterruptedException ie) {
throw ie;
}
@@ -317,7 +316,7 @@ private IStatus createLoginDialogAgain() {
try {
returnStatus = connectToDatabase(userName, pwd, dbInfo);
} catch (InterruptedException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
return returnStatus;
View
25 org.eclipse.jubula.communication/src/org/eclipse/jubula/communication/Communicator.java
@@ -36,7 +36,6 @@
import org.eclipse.jubula.communication.message.MessageHeader;
import org.eclipse.jubula.communication.message.MessageIdentifier;
import org.eclipse.jubula.communication.parser.MessageSerializer;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.exception.Assert;
import org.eclipse.jubula.tools.exception.AssertException;
import org.eclipse.jubula.tools.exception.CommunicationException;
@@ -313,13 +312,13 @@ public synchronized Thread run() throws SecurityException,
fireConnectingFailed(m_inetAddress, m_port);
}
} catch (IllegalArgumentException iae) {
- log.debug(DebugConstants.ERROR, iae);
+ log.debug(iae.getLocalizedMessage(), iae);
fireConnectingFailed(m_inetAddress, m_port);
} catch (IOException ioe) {
- log.debug(DebugConstants.ERROR, ioe);
+ log.debug(ioe.getLocalizedMessage(), ioe);
fireConnectingFailed(m_inetAddress, m_port);
} catch (SecurityException se) {
- log.debug(DebugConstants.ERROR, se);
+ log.debug(se.getLocalizedMessage(), se);
fireConnectingFailed(m_inetAddress, m_port);
throw se;
}
@@ -492,17 +491,17 @@ public void send(Message message) throws CommunicationException {
m_connection.send(new MessageHeader(MessageHeader.MESSAGE,
message), messageToSend);
} catch (SerialisationException se) {
- log.error(DebugConstants.ERROR, se);
+ log.error(se.getLocalizedMessage(), se);
throw new CommunicationException(
"could not send message:" //$NON-NLS-1$
+ se.getMessage(), MessageIDs.E_MESSAGE_NOT_SEND);
} catch (IOException ioe) {
- log.error(DebugConstants.ERROR, ioe);
+ log.error(ioe.getLocalizedMessage(), ioe);
throw new CommunicationException(
"io error occured during sending a message:" //$NON-NLS-1$
+ ioe.getMessage(), MessageIDs.E_MESSAGE_SEND);
} catch (IllegalArgumentException iae) {
- log.error(DebugConstants.ERROR, iae);
+ log.error(iae.getLocalizedMessage(), iae);
throw new CommunicationException(
"message could not send", MessageIDs.E_MESSAGE_NOT_SEND); //$NON-NLS-1$
}
@@ -577,24 +576,24 @@ public void request(Message message, ICommand command, int timeout)
messageToSend);
awaitingCommand.start();
} catch (SerialisationException se) {
- log.error(DebugConstants.ERROR, se);
+ log.error(se.getLocalizedMessage(), se);
throw new CommunicationException(
"could not send message as request:" //$NON-NLS-1$
+ se.getMessage(), MessageIDs.E_MESSAGE_NOT_TO_REQUEST);
} catch (IOException ioe) {
- log.error(DebugConstants.ERROR, ioe);
+ log.error(ioe.getLocalizedMessage(), ioe);
synchronized (m_awaitingCommands) {
m_awaitingCommands.remove(messageIdentifier);
}
throw new CommunicationException(
"io error occured during requesting a message: "//$NON-NLS-1$
+ ioe.getMessage(), MessageIDs.E_MESSAGE_REQUEST);
} catch (IllegalArgumentException iae) {
- log.error(DebugConstants.ERROR, iae);
+ log.error(iae.getLocalizedMessage(), iae);
synchronized (m_awaitingCommands) {
m_awaitingCommands.remove(messageIdentifier);
}
- log.debug(DebugConstants.ERROR, iae);
+ log.debug(iae.getLocalizedMessage(), iae);
throw new CommunicationException(
"message could not send as a request", //$NON-NLS-1$
MessageIDs.E_MESSAGE_NOT_TO_REQUEST);
@@ -1048,13 +1047,13 @@ public void run() {
}
} catch (IOException ioe) {
- log.debug(DebugConstants.ERROR, ioe);
+ log.debug(ioe.getLocalizedMessage(), ioe);
fireAcceptingFailed(m_serverSocket.getLocalPort());
// HERE exception manager if the IOExceptions
// are numerous, at the moment stop accepting
setAccepting(false);
} catch (Throwable t) {
- log.error(DebugConstants.ERROR, t);
+ log.error(t.getLocalizedMessage(), t);
setAccepting(false);
// HERE exception handler for accepting ?
// setAccepting(getAcceptingExceptionHandler().handle(t));
View
3 ...ipse.jubula.communication/src/org/eclipse/jubula/communication/connection/Connection.java
@@ -31,7 +31,6 @@
import org.eclipse.jubula.communication.message.MessageHeader.InvalidHeaderVersionException;
import org.eclipse.jubula.communication.parser.MessageHeaderSerializer;
import org.eclipse.jubula.communication.writer.MessageWriter;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.exception.SerialisationException;
import org.slf4j.Logger;
@@ -470,7 +469,7 @@ public void run() {
log.error("invalid header length token: " //$NON-NLS-1$
+ headerLengthToken, e);
} catch (InvalidHeaderVersionException ihve) {
- log.error(DebugConstants.ERROR, ihve);
+ log.error(ihve.getLocalizedMessage(), ihve);
} catch (Throwable t) {
log.error("exception raised", t); //$NON-NLS-1$
final IExceptionHandler exceptionHandler =
View
5 ...clipse.jubula.communication/src/org/eclipse/jubula/communication/connection/GDSocket.java
@@ -19,7 +19,6 @@
import java.net.InetAddress;
import java.net.Socket;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.exception.JBVersionException;
import org.eclipse.jubula.tools.messagehandling.MessageIDs;
import org.eclipse.jubula.tools.utils.TimeUtil;
@@ -111,7 +110,7 @@ private void respondToTypeRequest(long waitForServer)
handleState(false);
throw gdve;
} catch (IOException ioe) {
- log.error(DebugConstants.ERROR, ioe);
+ log.error(ioe.getLocalizedMessage(), ioe);
handleState(false);
}
}
@@ -189,7 +188,7 @@ private void waitForServerState(long waitForServer) throws
setConnectionEstablished(false);
}
} catch (IOException ioe) {
- log.error(DebugConstants.ERROR, ioe);
+ log.error(ioe.getLocalizedMessage(), ioe);
handleState(false);
}
}
View
7 org.eclipse.jubula.rc.common/src/org/eclipse/jubula/rc/common/AUTServer.java
@@ -37,7 +37,6 @@
import org.eclipse.jubula.rc.common.registration.IRegisterAut;
import org.eclipse.jubula.tools.constants.AUTServerExitConstants;
import org.eclipse.jubula.tools.constants.CommandConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.constants.TimingConstantsServer;
import org.eclipse.jubula.tools.exception.CommunicationException;
@@ -658,13 +657,13 @@ public void invokeAUT() throws ExceptionInInitializerError,
m_autMainMethod.invoke(null, new Object[] {m_autArgs});
} catch (IllegalArgumentException iae) {
m_isAutRunning = false;
- log.error(DebugConstants.ERROR, iae);
+ log.error(iae.getLocalizedMessage(), iae);
} catch (IllegalAccessException iae) {
m_isAutRunning = false;
- log.error(DebugConstants.ERROR, iae);
+ log.error(iae.getLocalizedMessage(), iae);
} catch (NullPointerException npe) {
m_isAutRunning = false;
- log.error(DebugConstants.ERROR, npe);
+ log.error(npe.getLocalizedMessage(), npe);
} catch (RuntimeException re) {
m_isAutRunning = false;
log.error("unexpected exception thrown by AUT: ", re); //$NON-NLS-1$
View
5 ...e.jubula.rc.common/src/org/eclipse/jubula/rc/common/adaptable/AdapterFactoryRegistry.java
@@ -21,7 +21,6 @@
import java.util.List;
import java.util.Map;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -152,9 +151,9 @@ public static void initRegistration() {
.newInstance();
getInstance().registerFactory(factory);
} catch (IllegalAccessException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
} catch (InstantiationException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
}
View
15 ...se.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/AbstractCapTestCommand.java
@@ -30,7 +30,6 @@
import org.eclipse.jubula.rc.common.exception.StepVerifyFailedException;
import org.eclipse.jubula.rc.common.exception.UnsupportedComponentException;
import org.eclipse.jubula.rc.common.implclasses.Verifier;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.i18n.CompSystemI18n;
import org.eclipse.jubula.tools.objects.IComponentIdentifier;
import org.eclipse.jubula.tools.objects.event.EventFactory;
@@ -82,7 +81,7 @@ public void setMessage(Message message) {
private void handleComponentNotFound(CAPTestResponseMessage response,
Throwable e) {
if (LOG.isWarnEnabled()) {
- LOG.warn(DebugConstants.ERROR, e);
+ LOG.warn(e.getLocalizedMessage(), e);
}
response.setTestErrorEvent(EventFactory
.createComponentNotFoundErrorEvent());
@@ -156,11 +155,11 @@ protected Object getImplClass(CAPTestResponseMessage response) {
handleComponentNotFound(response, e);
}
} catch (UnsupportedComponentException buce) {
- LOG.error(DebugConstants.ERROR, buce);
+ LOG.error(buce.getLocalizedMessage(), buce);
response.setTestErrorEvent(EventFactory.createConfigErrorEvent());
} catch (Throwable e) {
if (LOG.isErrorEnabled()) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
response.setTestErrorEvent(
EventFactory.createImplClassErrorEvent());
@@ -242,13 +241,13 @@ public Message execute() {
ite.getTargetException();
event = e.getEvent();
if (LOG.isDebugEnabled()) {
- LOG.debug(DebugConstants.ERROR, e);
+ LOG.debug(e.getLocalizedMessage(), e);
}
} else if (ite.getTargetException() instanceof ExecutionEvent) {
ExecutionEvent e = (ExecutionEvent)ite.getTargetException();
response.setState(e.getEvent());
if (LOG.isDebugEnabled()) {
- LOG.debug(DebugConstants.ERROR, e);
+ LOG.debug(e.getLocalizedMessage(), e);
}
} else {
event = EventFactory.createConfigErrorEvent();
@@ -258,9 +257,9 @@ public Message execute() {
}
}
} catch (IllegalArgumentException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
} catch (MethodParamException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
} finally {
if (AUTServer.getInstance().getMode() != oldMode) {
AUTServer.getInstance().setMode(oldMode);
View
3 ...pse.jubula.rc.common/src/org/eclipse/jubula/rc/common/commands/TakeScreenshotCommand.java
@@ -21,7 +21,6 @@
import org.eclipse.jubula.communication.message.Message;
import org.eclipse.jubula.communication.message.TakeScreenshotMessage;
import org.eclipse.jubula.communication.message.TakeScreenshotResponseMessage;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.serialisation.SerializedImage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -56,7 +55,7 @@ public Message execute() {
response.setScreenshot(SerializedImage.computeSerializeImage(bi));
} catch (AWTException e) {
if (LOG.isErrorEnabled()) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
}
}
return response;
View
9 org.eclipse.jubula.rc.swing/src/org/eclipse/jubula/rc/swing/SwingAUTServer.java
@@ -29,7 +29,6 @@
import org.eclipse.jubula.rc.swing.listener.MappingListener;
import org.eclipse.jubula.rc.swing.listener.RecordListener;
import org.eclipse.jubula.tools.constants.AUTServerExitConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.utils.EnvironmentUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -126,10 +125,10 @@ protected void addToolkitEventListener(BaseAUTListener listener) {
(AWTEventListener)listener, mask);
} catch (AWTError awte) {
// no default toolkit
- LOG.error(DebugConstants.ERROR, awte);
+ LOG.error(awte.getLocalizedMessage(), awte);
} catch (SecurityException se) {
// no permission to add an AWTEventListener
- LOG.error(DebugConstants.ERROR, se);
+ LOG.error(se.getLocalizedMessage(), se);
System.exit(AUTServerExitConstants
.EXIT_SECURITY_VIOLATION_AWT_EVENT_LISTENER);
}
@@ -148,12 +147,12 @@ protected void removeToolkitEventListener(BaseAUTListener listener) {
(AWTEventListener)listener);
} catch (AWTError awte) {
// no default toolkit
- LOG.error(DebugConstants.ERROR, awte);
+ LOG.error(awte.getLocalizedMessage(), awte);
} catch (SecurityException se) {
// no permission to remove an AWTEventListener,
// should not occur, because addAWTEventListener() should be called
// first. But just in case, close the vm
- LOG.error(DebugConstants.ERROR, se);
+ LOG.error(se.getLocalizedMessage(), se);
System.exit(AUTServerExitConstants
.EXIT_SECURITY_VIOLATION_AWT_EVENT_LISTENER);
}
View
5 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/SwtAUTServer.java
@@ -26,7 +26,6 @@
import org.eclipse.jubula.rc.swt.listener.RecordListener;
import org.eclipse.jubula.rc.swt.listener.TableSelectionTracker;
import org.eclipse.jubula.tools.constants.AUTServerExitConstants;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Listener;
import org.slf4j.Logger;
@@ -171,7 +170,7 @@ public void run() {
// no permission to remove an SWTEventListener,
// should not occur, because addSWTEventListener() should be called
// first. But just in case, close the vm
- LOG.error(DebugConstants.ERROR, se);
+ LOG.error(se.getLocalizedMessage(), se);
System.exit(AUTServerExitConstants
.EXIT_SECURITY_VIOLATION_AWT_EVENT_LISTENER);
}
@@ -204,7 +203,7 @@ public void run() {
// no permission to remove an SWTEventListener,
// should not occur, because addSWTEventListener() should be called
// first. But just in case, close the vm
- LOG.error(DebugConstants.ERROR, se);
+ LOG.error(se.getLocalizedMessage(), se);
System.exit(AUTServerExitConstants
.EXIT_SECURITY_VIOLATION_AWT_EVENT_LISTENER);
}
View
3 ...c.swt/src/org/eclipse/jubula/rc/swt/commands/SendAUTListOfSupportedComponentsCommand.java
@@ -18,7 +18,6 @@
import org.eclipse.jubula.rc.common.implclasses.IComponentFactory;
import org.eclipse.jubula.rc.swt.SwtAUTServer;
import org.eclipse.jubula.rc.swt.listener.ComponentHandler;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.xml.businessmodell.ConcreteComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -74,7 +73,7 @@ public void run() {
try {
m_componentIds.add(createIdentifier(m_concrete));
} catch (UnsupportedComponentException e) {
- log.error(DebugConstants.ERROR, e);
+ log.error(e.getLocalizedMessage(), e);
}
}
});
View
5 ...pse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/AbstractAutSwtEventListener.java
@@ -19,7 +19,6 @@
import org.eclipse.jubula.rc.common.listener.AUTEventListener;
import org.eclipse.jubula.rc.swt.SwtAUTServer;
import org.eclipse.jubula.rc.swt.utils.SwtUtils;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.exception.CommunicationException;
import org.eclipse.jubula.tools.objects.IComponentIdentifier;
import org.eclipse.swt.SWT;
@@ -170,7 +169,7 @@ protected void highlightComponent() {
componentClass);
}
} catch (IllegalArgumentException e) {
- LOG.warn(DebugConstants.ERROR, e);
+ LOG.warn(e.getLocalizedMessage(), e);
} catch (UnsupportedComponentException uce) {
closeBorderShell();
return;
@@ -306,7 +305,7 @@ public void run() {
+ String.valueOf(comp) + "' not found!", e); //$NON-NLS-1$
return false;
} catch (IllegalArgumentException e) {
- LOG.debug(DebugConstants.ERROR, e);
+ LOG.debug(e.getLocalizedMessage(), e);
return false;
}
return component != null;
View
9 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/ComponentHandler.java
@@ -24,7 +24,6 @@
import org.eclipse.jubula.rc.swt.SwtAUTServer;
import org.eclipse.jubula.rc.swt.components.SwtAUTHierarchy;
import org.eclipse.jubula.rc.swt.driver.EventThreadQueuerSwtImpl;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.TimingConstantsServer;
import org.eclipse.jubula.tools.exception.InvalidDataException;
import org.eclipse.jubula.tools.messagehandling.MessageIDs;
@@ -97,7 +96,7 @@ public static IComponentIdentifier getIdentifier(Widget component)
try {
return autHierarchy.getComponentIdentifier(component);
} catch (ComponentNotManagedException cnme) {
- log.warn(DebugConstants.ERROR, cnme);
+ log.warn(cnme.getLocalizedMessage(), cnme);
throw new NoIdentifierForComponentException(
"unable to create an identifier for '" //$NON-NLS-1$
+ component + "'", //$NON-NLS-1$
@@ -152,7 +151,7 @@ public static Widget findComponent(
try {
return autHierarchy.findComponent(componentIdentifier);
} catch (ComponentNotManagedException cnme) {
- log.warn(DebugConstants.ERROR, cnme);
+ log.warn(cnme.getLocalizedMessage(), cnme);
if (retry) {
while (System.currentTimeMillis() - start < timeout) {
@@ -195,10 +194,10 @@ public Object run() throws StepExecutionException {
throw new ComponentNotFoundException(
cnme.getMessage(), MessageIDs.E_COMPONENT_NOT_FOUND);
} catch (IllegalArgumentException iae) {
- log.error(DebugConstants.ERROR, iae);
+ log.error(iae.getLocalizedMessage(), iae);
throw iae;
} catch (InvalidDataException ide) {
- log.error(DebugConstants.ERROR, ide);
+ log.error(ide.getLocalizedMessage(), ide);
throw new ComponentNotFoundException(
ide.getMessage(), MessageIDs.E_COMPONENT_NOT_FOUND);
}
View
3 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/FocusTracker.java
@@ -12,7 +12,6 @@
import org.eclipse.jubula.rc.common.exception.RobotException;
import org.eclipse.jubula.rc.common.listener.BaseAUTListener;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.objects.event.EventFactory;
import org.eclipse.jubula.tools.objects.event.TestErrorEvent;
import org.eclipse.swt.SWT;
@@ -72,7 +71,7 @@ public void handleEvent(Event event) {
this.getClass().getClassLoader());
try {
if (log.isDebugEnabled()) {
- log.debug(DebugConstants.ERROR, event);
+ log.debug("Event: ", event);
}
switch (event.type) {
case SWT.FocusIn:
View
3 org.eclipse.jubula.rc.swt/src/org/eclipse/jubula/rc/swt/listener/MappingListener.java
@@ -15,7 +15,6 @@
import org.eclipse.jubula.rc.common.Constants;
import org.eclipse.jubula.rc.common.exception.NoIdentifierForComponentException;
import org.eclipse.jubula.rc.swt.SwtAUTServer;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.exception.CommunicationException;
import org.eclipse.jubula.tools.objects.IComponentIdentifier;
import org.eclipse.swt.SWT;
@@ -125,7 +124,7 @@ protected void handleKeyEvent(final Event event) {
// no identifier for the component, LOG this as an error
LOG.error("no identifier for '" + currComp); //$NON-NLS-1$
} catch (CommunicationException ce) {
- LOG.error(DebugConstants.ERROR, ce);
+ LOG.error(ce.getLocalizedMessage(), ce);
// do nothing here: a closed connection
// is handled by the AUTServer
}
View
15 ...lipse.jubula.toolkit.common/src/org/eclipse/jubula/toolkit/common/utils/ToolkitUtils.java
@@ -23,7 +23,6 @@
import org.eclipse.jubula.toolkit.common.exception.ToolkitPluginException;
import org.eclipse.jubula.toolkit.common.i18n.Messages;
import org.eclipse.jubula.toolkit.common.xml.businessprocess.ComponentBuilder;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.constants.ToolkitConstants;
import org.eclipse.jubula.tools.xml.businessmodell.CompSystem;
@@ -197,37 +196,37 @@ public static Composite createAutConfigComponent(String className,
autConfigDialog = constructor.newInstance(
new Object[]{parent, style, autConfig, autName});
} catch (SecurityException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
throw new ToolkitPluginException(
logMsg.toString()
+ String.valueOf(className), e);
} catch (IllegalArgumentException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
throw new ToolkitPluginException(
logMsg.toString()
+ String.valueOf(className), e);
} catch (ClassNotFoundException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
throw new ToolkitPluginException(
logMsg.toString()
+ String.valueOf(className), e);
} catch (NoSuchMethodException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
throw new ToolkitPluginException(
logMsg.toString()
+ String.valueOf(className), e);
} catch (InstantiationException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
throw new ToolkitPluginException(
logMsg.toString()
+ String.valueOf(className), e);
} catch (IllegalAccessException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
throw new ToolkitPluginException(
logMsg.toString()
+ String.valueOf(className), e);
} catch (InvocationTargetException e) {
- LOG.error(DebugConstants.ERROR, e);
+ LOG.error(e.getLocalizedMessage(), e);
throw new ToolkitPluginException(
logMsg.toString()
+ String.valueOf(className), e);
View
5 ...it.common/src/org/eclipse/jubula/toolkit/common/xml/businessprocess/ComponentBuilder.java
@@ -26,7 +26,6 @@
import org.eclipse.jubula.toolkit.common.businessprocess.ToolkitSupportBP;
import org.eclipse.jubula.toolkit.common.exception.ToolkitPluginException;
import org.eclipse.jubula.toolkit.common.i18n.Messages;
-import org.eclipse.jubula.tools.constants.DebugConstants;
import org.eclipse.jubula.tools.constants.StringConstants;
import org.eclipse.jubula.tools.constants.ToolkitConstants;
import org.eclipse.jubula.tools.exception.GDConfigXmlException;