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
Hi,
I have a problem with Governator that is turning runtime exceptions (eg IAE/ISE due to misconfigurations in PostConstructs) into Errors (which usually should not be catch in a program). The issue seems lying in InternalLifecycleModule#onProvision, where there is:
try { ...
} catch (ExecutionException e) {
// caching problem
throw new RuntimeException(e);
} catch (Throwable e) {
// unknown problem will abort injector start up
throw new Error(e);
}
is that really the expected behaviour you want? If there is a need to catch Throwable, what about adding before it something like the following?
catch(RuntimeException e){
throw e;
}
The text was updated successfully, but these errors were encountered:
sorry, a clarification: the issue is with a thrown InvocationTargetException (ITE), which extends Exception (not RuntimeException). So, when I call LifecycleInjector#createInjector there is no checked exception, but then runtime exceptions that lead to ITEs are masked into Error, which my main catch at the root of my application does not catch
Hi,
I have a problem with Governator that is turning runtime exceptions (eg IAE/ISE due to misconfigurations in PostConstructs) into Errors (which usually should not be catch in a program). The issue seems lying in
InternalLifecycleModule#onProvision
, where there is:is that really the expected behaviour you want? If there is a need to catch
Throwable
, what about adding before it something like the following?The text was updated successfully, but these errors were encountered: