Intercept exceptions in Python Methods
8 Jan
2001
8 Jan
'01
5:54 p.m.
I try to intercept exceptions in a Python Method without success. The following code works well: try: a = int('a') except: return 'exception.' but the next doesn't work: try: a = int('a') except ValueError: return 'exception' How can I intercept a concrete exception?
9219
Age (days ago)
9219
Last active (days ago)
0 comments
1 participants
participants (1)
-
Juan Carlos Coruña