Skip to content
Myr

Update exceptions.rst (#2407)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ebram Shehata · committed by GitHub · parent f1c160d · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/exceptions.rst+3 added-3 removed
11 unmodified lines
1213Click's main error handling is happening in :meth:`BaseCommand.main`. In14there it handles all subclasses of :exc:`ClickException` as well as the15standard :exc:`EOFError` and :exc:`KeyboardInterrupt` exceptions. The16latter are internally translated into a :exc:`Abort`.16latter are internally translated into an :exc:`Abort`.1718The logic applied is the following:19201. If an :exc:`EOFError` or :exc:`KeyboardInterrupt` happens, reraise it21 as :exc:`Abort`.222. If an :exc:`ClickException` is raised, invoke the222. If a :exc:`ClickException` is raised, invoke the23 :meth:`ClickException.show` method on it to display it and then exit24 the program with :attr:`ClickException.exit_code`.253. If an :exc:`Abort` exception is raised print the string ``Aborted!``26 to standard error and exit the program with exit code ``1``.274. if it goes through well, exit the program with exit code ``0``.274. If it goes through well, exit the program with exit code ``0``.2829What if I don't want that?30--------------------------31
42 unmodified lines