Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #109446 > unrolled thread
| Started by | Random832 <random832@fastmail.com> |
|---|---|
| First post | 2016-06-03 20:42 -0400 |
| Last post | 2016-06-03 20:42 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Catch exception with message? Random832 <random832@fastmail.com> - 2016-06-03 20:42 -0400
| From | Random832 <random832@fastmail.com> |
|---|---|
| Date | 2016-06-03 20:42 -0400 |
| Subject | Re: Catch exception with message? |
| Message-ID | <mailman.140.1465000941.1839.python-list@python.org> |
On Fri, Jun 3, 2016, at 19:14, Piyush Verma wrote: > Generally we catch exception using > except Exception as e: > > But sometimes, we see same type of exception is present with different > message.Is there a way to capture same exception with message > filtering? Please help me to do this. The message is meant to be human-readable, and may change without warning. Is there no other property on the exceptions you want to catch that can be used to distinguish them? (errno, perhaps?) What's your specific use case?
Back to top | Article view | comp.lang.python
csiph-web