Fix execution error message (#3702)

This commit is contained in:
Dmitry Bushev 2022-09-13 15:37:24 +03:00 committed by GitHub
parent b304402d8e
commit 77bcb87f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,11 +243,12 @@ object ProgramExecutionSupport {
case ExecutionItem.CallData(_, call) => call.getFunction.getName
}
val executionUpdate = getExecutionOutcome(error)
val reason = Option(error.getMessage).getOrElse(error.getClass.toString)
val message = error match {
case _: ThreadInterruptedException =>
s"Execution of function $itemName interrupted."
case _ =>
s"Execution of function $itemName failed. ${error.getMessage}"
s"Execution of function $itemName failed ($reason)."
}
ctx.executionService.getLogger.log(Level.WARNING, message)
executionUpdate.getOrElse(Api.ExecutionResult.Failure(message, None))