Python Forum
Excpetion Handling Getting Error Number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excpetion Handling Getting Error Number
#1
I don't know why this is rocket science but I cannot find any way to get just the error number in the exception handler. All the examples show how to get the text but not the error number. The documentation web server seems to be down.

except PermissionError as e:
   print(????error number??????)
Can someone save me from this frustration? TIA.
Reply


Messages In This Thread
Excpetion Handling Getting Error Number - by gw1500se - May-29-2020, 02:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trouble with Average Calculation Despite Error Handling autodecay 3 1,099 Jul-02-2024, 01:53 PM
Last Post: Hichem
  Calculating Average with Error Handling mikasa 7 3,157 May-07-2024, 07:48 AM
Last Post: snippsat
Star python exception handling handling .... with traceback mg24 3 3,390 Nov-09-2022, 07:29 PM
Last Post: Gribouillis
  Help needed with a "for loop" + error handling tamiri 2 7,298 May-27-2022, 12:21 PM
Last Post: tamiri
  Handling Python Fatal Error richajain1785 7 8,891 Oct-14-2021, 01:34 PM
Last Post: Tails86
  Even number code syntax error MrCeez 1 2,943 May-02-2021, 06:43 PM
Last Post: Larz60+
  Error Handling JarredAwesome 5 4,176 Oct-17-2020, 12:41 AM
Last Post: JarredAwesome
  Error handling using cmd module leifeng 3 4,284 Jun-06-2020, 06:25 PM
Last Post: leifeng
  Error when entering letter/character instead of number/integer helplessnoobb 2 9,602 Jun-22-2019, 07:15 AM
Last Post: ThomasL
  Warning / Error handling in python Prarthana_12 1 5,787 Feb-08-2019, 09:21 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020