Python Forum
Excpetion Handling Getting Error Number
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excpetion Handling Getting Error Number
#3
I thought all exceptions had the same format. Based on your reply I am guessing that is not true. When I print e, I get this:

[Errno 13] Permission denied

Depending on the permission error the number is different but the format is the same. I tried parsing 'e' but it is not just a string so I could not come up with a way to extract it. I tried using various applications of 'split' but the result is always something odd that is not in the printed string (I get things like '[' and ''', etc)
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calculating Average with Error Handling mikasa 7 393 10 hours ago
Last Post: snippsat
Star python exception handling handling .... with traceback mg24 3 1,315 Nov-09-2022, 07:29 PM
Last Post: Gribouillis
  Help needed with a "for loop" + error handling tamiri 2 2,596 May-27-2022, 12:21 PM
Last Post: tamiri
  Handling Python Fatal Error richajain1785 7 6,005 Oct-14-2021, 01:34 PM
Last Post: Tails86
  Even number code syntax error MrCeez 1 2,309 May-02-2021, 06:43 PM
Last Post: Larz60+
  Error Handling JarredAwesome 5 3,000 Oct-17-2020, 12:41 AM
Last Post: JarredAwesome
  Error handling using cmd module leifeng 3 2,936 Jun-06-2020, 06:25 PM
Last Post: leifeng
  Error when entering letter/character instead of number/integer helplessnoobb 2 7,139 Jun-22-2019, 07:15 AM
Last Post: ThomasL
  Warning / Error handling in python Prarthana_12 1 5,144 Feb-08-2019, 09:21 PM
Last Post: snippsat
  Help With Error Handling jo15765 6 4,159 Sep-14-2018, 06:27 PM
Last Post: jo15765

Forum Jump:

User Panel Messages

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