Open nayeemzen opened 2 years ago
Admittedly, I haven't really been using this project, and I haven't dabbled much with Java modules, so I'm not too familiar with them.
Do module loading errors typically show up as ConfigurationException
s? I would've thought they'd show up as ExceptionInInitializerError
s (or something similar), which would get wrapped into a ProvisionException
.
I think I agree with you that swallowing ConfigurationException
s seems like a bad idea (ideally, we should just fix the module configuration mistake instead of allowing the test to try and run anyway), and I don't have any notes on what I was thinking back then either :)
If you think this would stop us from swallowing module loading errors, I'd be happy to approve a PR that stops us from swallowing ConfigurationException
s.
The Guice Junit5 extension swallows any module loading errors (e.g errors that could happen during object creation), which leads to a generic error
This makes the actual error cause hard to debug, since we'll have to dig into what's causing the error, most likely with a breakpoint here.
Should it be swallowing
ConfigurationException
? Might be better to let it fail eagerly since something clearly went wrong trying to load the Guice module, or add some logs so its immediately obvious what the error is.