Skip to content

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

@remkop

Description

@remkop

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));

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions