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/22 05:10:00 UTC
[jira] [Resolved] (SPARK-38986) Prepend error class tag to error messages
[ https://issues.apache.org/jira/browse/SPARK-38986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Gekk resolved SPARK-38986.
------------------------------
Fix Version/s: 3.4.0
Resolution: Fixed
Issue resolved by pull request 36287
[https://github.com/apache/spark/pull/36287]
> 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
> Priority: Major
> Fix For: 3.4.0
>
>
> 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