Class ThrowableResultHandler

java.lang.Object
org.springframework.shell.result.TerminalAwareResultHandler<Throwable>
org.springframework.shell.result.ThrowableResultHandler
All Implemented Interfaces:
ResultHandler<Throwable>

public class ThrowableResultHandler extends TerminalAwareResultHandler<Throwable>
A ResultHandler that prints thrown exceptions messages in red. Stores the last exception reported, so that details can be printed using a dedicated command if in interactive mode. Prints stacktrace if in non-interactive mode as dedicated command could not be used.
  • Field Details

    • DETAILS_COMMAND_NAME

      public static final String DETAILS_COMMAND_NAME
      The name of the command that may be used to print details about the last error.
      See Also:
  • Constructor Details

    • ThrowableResultHandler

      public ThrowableResultHandler(org.jline.terminal.Terminal terminal, CommandCatalog commandCatalog, ShellContext shellContext, org.springframework.beans.factory.ObjectProvider<InteractiveShellRunner> interactiveRunner)
  • Method Details