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

Add convenience API ColorScheme::stackTraceText(Throwable) #1129

Closed
remkop opened this issue Jul 16, 2020 · 0 comments
Closed

Add convenience API ColorScheme::stackTraceText(Throwable) #1129

remkop opened this issue Jul 16, 2020 · 0 comments
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Jul 16, 2020

Currently, client code using ColorScheme::stackTraceText looks like this:

StringWriter sw = new StringWriter();
ex.printStackTrace(new PrintWriter(sw, true));
err.println(cmd.getColorScheme().stackTraceText(sw.toString()));

We can add a convenience API that accepts a Throwable, so that the above can be reduced to one line:

err.println(cmd.getColorScheme().stackTraceText(ex));
@remkop remkop added this to the 4.5 milestone Jul 16, 2020
@remkop remkop closed this as completed in 98901b5 Jul 16, 2020
@remkop remkop modified the milestones: 4.5, 4.4.1 Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant