Describe the bug
When instantiating a use case, an ExceptionInInitializerError can be thrown when an exception is thrown in the class' static initializer. This exception is currently not handled:
final Object useCase = useCaseInstantiator.instantiate(useCaseClass);
To Reproduce
- Throw an exception from a use case static initializer
- Configure httpmate to instantiate that use case
- Causes the instantiation to happen
- The default exception mapper is not invoked
Expected behavior
- The exception mapping logic should occur when an
ExceptionInInitializerError is thrown, regardless of whether it happens during use case instantiation or use case invocation.