diff options
-rw-r--r-- | framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java index 2692b7257..8de74db23 100644 --- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java +++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/core/util/Trace.java @@ -400,7 +400,11 @@ public class Trace { if (shouldTrace(pluginId, option)) { StringBuffer buf = new StringBuffer(PREFIX_CATCHING); - buf.append(throwable.getMessage()).append(SEPARATOR_SPACE); + if (throwable != null) { + String message = throwable.getMessage(); + if (message != null) + buf.append(message).append(SEPARATOR_SPACE); + } buf.append(PARENTHESIS_OPEN).append(clazz.getName()) .append(SEPARATOR_METHOD); buf.append(methodName).append(PARENTHESIS_CLOSE); @@ -431,7 +435,11 @@ public class Trace { if (shouldTrace(pluginId, option)) { StringBuffer buf = new StringBuffer(PREFIX_THROWING); - buf.append(throwable.getMessage()).append(SEPARATOR_SPACE); + if (throwable != null) { + String message = throwable.getMessage(); + if (message != null) + buf.append(message).append(SEPARATOR_SPACE); + } buf.append(PARENTHESIS_OPEN).append(clazz.getName()) .append(SEPARATOR_METHOD); buf.append(methodName).append(PARENTHESIS_CLOSE); |