Skip to content

Commit 678db72

Browse files
authored
docs: note that command() does not catch exceptions (#10360)
1 parent 70517a4 commit 678db72

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎user_guide_src/source/cli/spark_commands.rst‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,8 @@ it from the command line.
119119

120120
All output from the command that is ran is captured when not run from the command line. It is returned from the command
121121
so that you can choose to display it or not.
122+
123+
.. note:: The ``command()`` function does not catch exceptions thrown while the command runs.
124+
:doc:`Modern commands <cli_modern_commands>` in particular throw when their input fails
125+
validation, such as a missing required argument or an unknown option. Wrap the call in a
126+
``try``/``catch`` block if you need to handle these cases.

0 commit comments

Comments
 (0)