Interface ExitCodeExceptionMapper

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ExitCodeExceptionMapper
Strategy interface that can be used to provide a mapping between exceptions and exit codes.
Since:
1.3.2
Author:
Phillip Webb
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the exit code that should be returned from the application.
  • Method Details

    • getExitCode

      int getExitCode(Throwable exception)
      Returns the exit code that should be returned from the application.
      Parameters:
      exception - the exception causing the application to exit
      Returns:
      the exit code or 0.