Propagate the cause that led Reactor"s debug agent to fail

Prior to this commit, DebugAgentEnvironmentPostProcessor throws a
RuntimeException with a generic error message if its initialization
fails. The causing exception is discarded, which makes error analysis
unnecessarily difficult.

This commit attaches the cause to the newly thrown RuntimeException.

See gh-22777
This commit is contained in:
davidbilge
2020-08-07 09:29:19 +02:00
committed by Stephane Nicoll
parent f39f33bb8d
commit 12c419054a

View File

@@ -49,7 +49,7 @@ public class DebugAgentEnvironmentPostProcessor implements EnvironmentPostProces
debugAgent.getMethod("init").invoke(null);
}
catch (Exception ex) {
throw new RuntimeException("Failed to init Reactor's debug agent");
throw new RuntimeException("Failed to init Reactor's debug agent", ex);
}
}
}