gh-92119: ctypes: Print exception class name instead of its representation (GH-98302)

(cherry picked from commit b9dedfe61dce2997e3e6be318d8c50b0c19c9394)

Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
4 files changed