Merge pull request #7880 from dataease/pr@dev-v2@refactor_sql_info

refactor(数据集): 详细展示Calcite执行SQL时的报错提示
This commit is contained in:
Junjun 2024-01-29 16:53:49 +08:00 committed by GitHub
commit b13e417583
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,7 +174,13 @@ public class CalciteProvider {
}
list = getDataResult(resultSet);
} catch (Exception | AssertionError e) {
DEException.throwException(Translator.get("i18n_fetch_error") + e.getMessage());
String msg;
if (e.getCause() != null && e.getCause().getCause() != null) {
msg = e.getMessage() + " [" + e.getCause().getCause().getMessage() + "]";
} else {
msg = e.getMessage();
}
DEException.throwException(Translator.get("i18n_fetch_error") + msg);
} finally {
try {
if (resultSet != null) resultSet.close();