gh-102011: use sys.exception() instead of sys.exc_info() in docs where possible (GH-102012)

(cherry picked from commit 4d3bc89a3f54c4f09756a9b644b3912bf54191a7)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
6 files changed