throws HCatException {
try {
hmsClient.createTable(createTableDesc.toHiveTable(hiveConfig));
} catch (AlreadyExistsException e) {
if (!createTableDesc.getIfNotExists()) {
throw new HCatException(
"AlreadyExistsException while creating table.", e);
}
} catch (InvalidObjectException e) {
throw new HCatException(
"InvalidObjectException while creating table.", e);
} catch (MetaException e) {
throw new HCatException("MetaException while creating table.", e);
} catch (NoSuchObjectException e) {
throw new ObjectNotFoundException(
"NoSuchObjectException while creating table.", e);
} catch (TException e) {
throw new ConnectionFailureException(
"TException while creating table.", e);
} catch (IOException e) {
throw new HCatException("IOException while creating hive conf.", e);
}
}