refactor(数据集): 详细展示Calcite执行SQL时的报错提示

This commit is contained in:
junjun 2024-01-29 16:50:57 +08:00
parent 4a5f3219cf
commit 0c4616eb67

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();