uros-b commented on code in PR #56664:
URL: https://github.com/apache/spark/pull/56664#discussion_r3462764499
##########
core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala:
##########
@@ -510,7 +510,8 @@ private[deploy] class SparkSubmitArguments(args:
Seq[String], env: Map[String, S
*/
override protected def handleUnknown(opt: String): Boolean = {
if (opt.startsWith("-")) {
- error(s"Unrecognized option '$opt'.")
+ SparkSubmit.printErrorAndExit(s"Unrecognized option '$opt'.")
Review Comment:
printErrorAndExit returns Unit, not Nothing. It calls exitFn(1, None) and
returns normally. exitFn is private[spark] var and is mocked in tests to set a
flag and return. Under any mocked/test context, execution falls through past
the call and continues: --blarg is then assigned as primaryResource and
submission proceeds. The original throw stopped control flow unconditionally;
the replacement does not.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]