Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check whether exception message is null before recording tracing anno… #130

Merged
merged 1 commit into from
Mar 30, 2016

Conversation

anuraaga
Copy link
Collaborator

…tation as null values are not allowed.

@trustin trustin added this to the 0.12.2.Final milestone Mar 30, 2016
@trustin trustin added the defect label Mar 30, 2016
@@ -112,7 +112,7 @@ public final void invoke(ServiceInvocationContext ctx,
final String resultText = result.isSuccess() ? "success" : "failure";
annotations.add(KeyValueAnnotation.create("server.result", resultText));

if (result.cause() != null) {
if (result.cause() != null && result.cause().getMessage() != null) {
annotations.add(KeyValueAnnotation.create("server.cause", result.cause().getMessage()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just:

KeyValueAnnotation.create("server.cause", result.getCause().toString());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants