} catch (InvocationTargetException ite) {
// This may have been the ExitSecurityException triggered by the
// SubprocessSecurityManager.
Throwable cause = ite.getCause();
if (cause instanceof ExitSecurityException) {
ExitSecurityException ese = (ExitSecurityException) cause;
int status = ese.getExitStatus();
if (status != 0) {
throw new IOException("HCatCli exited with status=" + status);
}
} else {
throw new IOException("Exception thrown from HCatCli", ite);