Fix exception mapping with exit codes
- Migitates changed behaviour in boot how exceptions are handled thus caused trouble with exit code mappings on a shell side. - Fixes #961
This commit is contained in:
@@ -1080,7 +1080,7 @@ public interface CommandRegistration {
|
||||
@Override
|
||||
public ExitCodeSpec map(Class<? extends Throwable> e, int code) {
|
||||
Function<Throwable, Integer> f = t -> {
|
||||
if (ObjectUtils.nullSafeEquals(t.getClass(), e)) {
|
||||
if (t != null && ObjectUtils.nullSafeEquals(t.getClass(), e)) {
|
||||
return code;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user