Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109444

Catch exception with message?

From Piyush Verma <114piyush@gmail.com>
Newsgroups comp.lang.python
Subject Catch exception with message?
Date 2016-06-04 04:44 +0530
Message-ID <mailman.138.1464995679.1839.python-list@python.org> (permalink)
References <CAJV9OM_eDYJHsq1J7N9mYQEyqRsUR1S7LOJWZ8+XGEJ_h3CHYw@mail.gmail.com>

Show all headers | View raw


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.

Regards,
~Piyush

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Catch exception with message? Piyush Verma <114piyush@gmail.com> - 2016-06-04 04:44 +0530
  Re: Catch exception with message? Steven D'Aprano <steve@pearwood.info> - 2016-06-04 12:38 +1000
  Re: Catch exception with message? Peter Pearson <pkpearson@nowhere.invalid> - 2016-06-04 16:44 +0000
    Re: Catch exception with message? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-04 16:39 -0700

csiph-web