You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/04/21 16:36:00 UTC

[jira] [Commented] (SPARK-38986) Prepend error class tag to error messages

    [ https://issues.apache.org/jira/browse/SPARK-38986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17525835#comment-17525835 ] 

Apache Spark commented on SPARK-38986:
--------------------------------------

User 'MaxGekk' has created a pull request for this issue:
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
>
> 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