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

Wire up client to send errors to http server / Change 'shows details' button to 'report to TripleA' #4687

Merged
merged 5 commits into from
Feb 22, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.Optional;
import java.util.function.BiFunction;
import java.util.logging.LogRecord;
import java.util.stream.Collectors;

import javax.annotation.Nullable;

Expand Down Expand Up @@ -94,14 +95,14 @@ private static String throwableToString(final Throwable e) {
+ Optional.ofNullable(e.getStackTrace())
.map(
trace -> "## Stack Trace\n"
+ String.join("\n", stackTraceToString(trace))
+ stackTraceToString(trace)
+ "\n\n")
.orElse("");
}

private static String[] stackTraceToString(final StackTraceElement[] stackTrace) {
private static String stackTraceToString(final StackTraceElement[] stackTrace) {
return Arrays.stream(stackTrace)
.map(StackTraceElement::toString)
.toArray(String[]::new);
.collect(Collectors.joining("\n\n"));
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious where the additional newline comes from.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good eye, fixed: ed10bfa

}
}