docs/library: Note link between machine.soft_reset() and sys.exit().
This is currently an implementation detail of MicroPython rather than by design. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
committed by
Damien George
parent
a23277e3b0
commit
c5d74fe468
@@ -194,6 +194,12 @@ Exceptions
|
||||
|
||||
|see_cpython| `python:SystemExit`.
|
||||
|
||||
On non-embedded ports (i.e. Windows and Unix), an unhandled ``SystemExit``
|
||||
exits the MicroPython process in a similar way to CPython.
|
||||
|
||||
On embedded ports, an unhandled ``SystemExit`` currently causes a
|
||||
:ref:`soft_reset` of MicroPython.
|
||||
|
||||
.. exception:: TypeError
|
||||
|
||||
|see_cpython| `python:TypeError`.
|
||||
|
||||
@@ -12,9 +12,12 @@ Functions
|
||||
.. function:: exit(retval=0, /)
|
||||
|
||||
Terminate current program with a given exit code. Underlyingly, this
|
||||
function raise as `SystemExit` exception. If an argument is given, its
|
||||
function raises a `SystemExit` exception. If an argument is given, its
|
||||
value given as an argument to `SystemExit`.
|
||||
|
||||
On embedded ports (i.e. all ports but Windows and Unix), an unhandled
|
||||
`SystemExit` currently causes a :ref:`soft_reset` of MicroPython.
|
||||
|
||||
.. function:: atexit(func)
|
||||
|
||||
Register *func* to be called upon termination. *func* must be a callable
|
||||
|
||||
Reference in New Issue
Block a user