You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2022/04/21 16:34:00 UTC
[jira] [Created] (SPARK-38986) Prepend error class tag to error messages
Max Gekk created SPARK-38986:
--------------------------------
Summary: Prepend error class tag to error messages
Key: SPARK-38986
URL: https://issues.apache.org/jira/browse/SPARK-38986
Project: Spark
Issue Type: Sub-task
Components: SQL
Affects Versions: 3.4.0
Reporter: Max Gekk
Assignee: Max Gekk
Prepend error messages by error class tags by extending the following method in SparkThrowableHelper:
{code:scala}
def getMessage(errorClass: String, messageParameters: Array[String]): String = {
val errorInfo = errorClassToInfoMap.getOrElse(errorClass,
throw new IllegalArgumentException(s"Cannot find error class '$errorClass'"))
String.format(errorInfo.messageFormat.replaceAll("<[a-zA-Z0-9_-]+>", "%s"),
messageParameters: _*)
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org