You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2023/01/09 12:02:46 UTC

[GitHub] [spark] itholic commented on a diff in pull request #39464: [SPARK-41947][CORE][DOCS] Update the contents of error class guidelines

itholic commented on code in PR #39464:
URL: https://github.com/apache/spark/pull/39464#discussion_r1064566451


##########
core/src/main/resources/error/README.md:
##########
@@ -24,27 +24,27 @@ Throw with arbitrary error message:
 
 ### After
 
-`error-class.json`
+`error-classes.json`
 
     "PROBLEM_BECAUSE": {
-      "message": ["Problem %s because %s"],
+      "message": ["Problem <problem> because <cause>"],
       "sqlState": "XXXXX"
     }
 
 `SparkException.scala`
 
     class SparkTestException(
         errorClass: String,
-        messageParameters: Seq[String])
+        messageParameters: Map[String, String])
       extends TestException(SparkThrowableHelper.getMessage(errorClass, messageParameters))
         with SparkThrowable {
         
-      def getErrorClass: String = errorClass
+      override def getErrorClass: String = errorClass

Review Comment:
   Updated the example. Thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org