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 186ba96341..b17c035587 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 c3eb869b92..a47a0b395a 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) } } }