Files
spring-shell/spring-shell-docs/modules/ROOT/pages/using-shell-commands-exceptionhandling.adoc
2023-08-03 11:11:12 -05:00

20 lines
930 B
Plaintext

[[dynamic-command-exitcode]]
=== Exception Handling
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
Exceptions happen from a user code wether it is intentional or not. This section describes
how `spring-shell` handles exceptions and gives instructions and best practices how to
work with it.
Many command line applications when applicable return an _exit code_ which running environment
can use to differentiate if command has been executed successfully or not. In a `spring-shell`
this mostly relates when a command is run on a non-interactive mode meaning one command
is always executed once with an instance of a `spring-shell`. Take a note that _exit code_
always relates to non-interactive shell.
include::using-shell-commands-exceptionhandling-resolving.adoc[]
include::using-shell-commands-exceptionhandling-mappings.adoc[]
include::using-shell-commands-exceptionhandling-annotation.adoc[]