This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/master by this push:
new 9f8559b04 [optimize] return to the custom error info (#4835)
9f8559b04 is described below
commit 9f8559b048422c6961807010a58bfe5189792ed9
Author: 人生有如两个橘子 <[email protected]>
AuthorDate: Wed Aug 2 10:28:25 2023 +0800
[optimize] return to the custom error info (#4835)
* [optimize] return to the custom error info
* format
---
.../linkis/manager/engineplugin/python/executor/PythonSession.scala | 6 ++++--
.../linkis/engineplugin/spark/executor/SparkPythonExecutor.scala | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git
a/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala
b/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala
index 186ba9634..b17c03558 100644
---
a/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala
+++
b/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala
@@ -169,9 +169,11 @@ class PythonSession extends Logging {
if (process == null) {
Utils.tryThrow(initGateway) { t =>
{
- logger.error("initialize python executor failed, please ask
administrator for help!", t)
+ val errMsg =
+ s"initialize python executor failed, please ask administrator
for help! errMsg: ${t.getMessage}"
+ logger.error(errMsg, t)
Utils.tryAndWarn(close)
- throw t
+ throw new IllegalStateException(errMsg, t)
}
}
}
diff --git
a/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala
b/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala
index c3eb869b9..a47a0b395 100644
---
a/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala
+++
b/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala
@@ -289,9 +289,11 @@ class SparkPythonExecutor(val sparkEngineSession:
SparkEngineSession, val id: In
if (process == null) {
Utils.tryThrow(initGateway) { t =>
{
- logger.error("initialize python executor failed, please ask
administrator for help!", t)
+ val errMsg =
+ s"initialize python executor failed, please ask administrator for
help! errMsg: ${t.getMessage}"
+ logger.error(errMsg, t)
Utils.tryAndWarn(close)
- throw t
+ throw new IllegalStateException(errMsg, t)
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]