stoty commented on PR #251:
URL: https://github.com/apache/calcite-avatica/pull/251#issuecomment-2616001612
I have changed the name back to sneakyThrow().
Since we're going for perfection, we may also want to reconsider callAs().
Subject callAs() throws Exceptions, and the fallback path now also throws
exceptions (wrapped in PrivilegedActionException).
We could change it to something like :
public static <T> T callAs(Subject subject, Callable<T> action) throws
Exception {
try {
return (T) CALL_AS.invoke(subject, action);
} catch (PrivilegedActionException e) {
e.getException();
} catch (Exception e) {
throw e;
} catch (Throwable t) {
throw sneakyThrow(t);
}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]