Skip to content

Commit

Permalink
branch-3.0: [fix](iceberg) Fill in the detailed error information #45415
Browse files Browse the repository at this point in the history
 (#45687)

Cherry-picked from #45415

Co-authored-by: wuwenchi <[email protected]>
  • Loading branch information
github-actions[bot] and wuwenchi authored Dec 20, 2024
1 parent 0137c8e commit 4ddf3b0
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public List<String> listDatabaseNames() {
.map(n -> n.level(n.length() - 1))
.collect(Collectors.toList()));
} catch (Exception e) {
throw new RuntimeException("Failed to list database names, error message is: " + e.getMessage());
throw new RuntimeException("Failed to list database names, error message is:" + e.getMessage(), e);
}
}

Expand All @@ -125,7 +125,7 @@ public void createDb(CreateDbStmt stmt) throws DdlException {
});
} catch (Exception e) {
throw new DdlException("Failed to create database: "
+ stmt.getFullDbName() + " ,error message is: " + e.getMessage());
+ stmt.getFullDbName() + ", error message is:" + e.getMessage(), e);
}
}

Expand Down Expand Up @@ -161,7 +161,7 @@ public void dropDb(DropDbStmt stmt) throws DdlException {
});
} catch (Exception e) {
throw new DdlException(
"Failed to drop database: " + stmt.getDbName() + ", error message is: " + e.getMessage(), e);
"Failed to drop database: " + stmt.getDbName() + ", error message is:" + e.getMessage(), e);
}
}

Expand All @@ -184,7 +184,8 @@ public boolean createTable(CreateTableStmt stmt) throws UserException {
try {
preExecutionAuthenticator.execute(() -> performCreateTable(stmt));
} catch (Exception e) {
throw new DdlException("Failed to create table: " + stmt.getTableName() + " ,error message is:", e);
throw new DdlException(
"Failed to create table: " + stmt.getTableName() + ", error message is:" + e.getMessage(), e);
}
return false;
}
Expand Down Expand Up @@ -228,7 +229,8 @@ public void dropTable(DropTableStmt stmt) throws DdlException {
return null;
});
} catch (Exception e) {
throw new DdlException("Failed to drop table: " + stmt.getTableName() + " ,error message is:", e);
throw new DdlException(
"Failed to drop table: " + stmt.getTableName() + ", error message is:" + e.getMessage(), e);
}
}

Expand Down

0 comments on commit 4ddf3b0

Please sign in to comment.