You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Cucumber JVM with my own implementation of InjectorSource, if my Guice modules are misconfigured and the injector fails to initialize, a runtime exception is thrown with root cause details (e.g. missing binding for a required interface).
GuiceFactory.stop needs a null check to avoid NullPointerException, but the cleanup code in Runner should ideally also suppress exceptions and add them to the root cause exception (using Throwable.addSuppressed).
👓 What did you see?
Using Cucumber JVM with my own implementation of
InjectorSource
, if my Guice modules are misconfigured and the injector fails to initialize, a runtime exception is thrown with root cause details (e.g. missing binding for a required interface).However, when this happens, GuiceFactory.stop() gets invoked by Runner.disposeBackendWorlds() which is in turn invoked in a
finally
block in Runner.runPickle().GuiceFactory.stop needs a null check to avoid NullPointerException, but the cleanup code in Runner should ideally also suppress exceptions and add them to the root cause exception (using Throwable.addSuppressed).
✅ What did you expect to see?
The root cause exception
📦 Which tool/library version are you using?
🔬 How could we reproduce it?
Steps to reproduce the behavior:
git clone https://github.com/chriseldredge/cucumber-guice-startup-exception-masked.git
The text was updated successfully, but these errors were encountered: