From e61f4ad16de1549f858a63c83f0d8a2d42c829c7 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Wed, 1 Jul 2026 11:18:16 +0800 Subject: [PATCH] docs: note that `command()` does not catch exceptions --- user_guide_src/source/cli/spark_commands.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/user_guide_src/source/cli/spark_commands.rst b/user_guide_src/source/cli/spark_commands.rst index 1fc3f061401d..86c0af9d877f 100644 --- a/user_guide_src/source/cli/spark_commands.rst +++ b/user_guide_src/source/cli/spark_commands.rst @@ -119,3 +119,8 @@ it from the command line. All output from the command that is ran is captured when not run from the command line. It is returned from the command so that you can choose to display it or not. + +.. note:: The ``command()`` function does not catch exceptions thrown while the command runs. + :doc:`Modern commands ` in particular throw when their input fails + validation, such as a missing required argument or an unknown option. Wrap the call in a + ``try``/``catch`` block if you need to handle these cases.