Skip to content

Commit

Permalink
[optimize] return to the custom error info (#4835)
Browse files Browse the repository at this point in the history
* [optimize] return to the custom error info

* format
  • Loading branch information
guoshupei authored Aug 2, 2023
1 parent ead6822 commit 9f8559b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 9f8559b

Please sign in to comment.