Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/22989#discussion_r232496215 --- Diff: scalastyle-config.xml --- @@ -240,6 +240,18 @@ This file is divided into 3 sections: ]]></customMessage> </check> + <check customId="notthrowoutofmemory" level="error" class="org.scalastyle.file.RegexChecker" enabled="true"> + <parameters><parameter name="regex">throw new OutOfMemoryError</parameter></parameters> + <customMessage><![CDATA[ + Are you sure that you want to throw OutOfMemoryError? It will kill the hole executor, you should use --- End diff -- This rule wouldn't be specific to executor code though. Just say it's bad practice to throw Error
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org