Skip to content

Allow exit codes to be deduced from Exceptions #4803

@philwebb

Description

@philwebb

As part of the spring-task work it would be nice if specific exit codes could be generated by exceptions.

Currently exit code generation looks like this:

        System.exit(SpringApplication
                .exit(SpringApplication.run(SampleBatchApplication.class, args)));

It would be nice if you could just throw an exception from a command line runner and if it implements ExitCodeGenerator have the appropriate code returned.

Metadata

Metadata

Assignees

Labels

type: blockerAn issue that is blocking us from releasingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions