Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Paul Rubin
Antoon Pardon writes: > Now I found the following in the logs: [Errno 131] Connection reset by peer > This is a problem I would like to catch earlier I'd expect that's an IOError thrown by the socket library. You could just let it go uncaught and see what you get in the crash dump. -- https://

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Ben Finney
Antoon Pardon writes: > Python 2.6.4 on a solaris box. > > I have a program in which all kind of excptions can be thrown and caugth. > The main program is something like below: > > try: > do_stuff > except Exception: > log unexpected trouble You're throwing away the exception object, wit

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread William Ray Wing
> On Sep 5, 2017, at 4:50 AM, Antoon Pardon wrote: > > Python 2.6.4 on a solaris box. > > I have a program in which all kind of excptions can be thrown and caugth. > The main program is something like below: > > try: >do_stuff > except Exception: >log unexpected trouble > > Now I foun

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Antoon Pardon
On 05-09-17 13:39, Steve D'Aprano wrote: > On Tue, 5 Sep 2017 06:50 pm, Antoon Pardon wrote: > >> Python 2.6.4 on a solaris box. >> >> I have a program in which all kind of excptions can be thrown and caugth. >> The main program is something like below: >> >> try: >> do_stuff >> except Excepti

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Steve D'Aprano
On Tue, 5 Sep 2017 06:50 pm, Antoon Pardon wrote: > Python 2.6.4 on a solaris box. > > I have a program in which all kind of excptions can be thrown and caugth. > The main program is something like below: > > try: > do_stuff > except Exception: > log unexpected trouble > > Now I found t

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Cameron Simpson
On 05Sep2017 10:50, Antoon Pardon wrote: Python 2.6.4 on a solaris box. I have a program in which all kind of excptions can be thrown and caugth. The main program is something like below: try: do_stuff except Exception: log unexpected trouble Now I found the following in the logs: [Errn

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Cameron Simpson
On 05Sep2017 19:44, Cameron Simpson wrote: Almost anything which says "Errno ..." is almost always an OSError (or an IOError as I found the other day). I try to be quite picky about these. So for example: Oh yes, and on a UNIX host such as Solaris the command "man 2 intro" will normally show

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread Peter Otten
Antoon Pardon wrote: > Python 2.6.4 on a solaris box. > > I have a program in which all kind of excptions can be thrown and caugth. > The main program is something like below: > > try: > do_stuff > except Exception: > log unexpected trouble > > Now I found the following in the logs: [Er

Re: How do I find what kind of exception is thrown.

2017-09-05 Thread David Palao
Hi, It looks to me like an OSError, can it be? Best 2017-09-05 10:50 GMT+02:00 Antoon Pardon : > Python 2.6.4 on a solaris box. > > I have a program in which all kind of excptions can be thrown and caugth. > The main program is something like below: > > try: > do_stuff > except Exception: >

How do I find what kind of exception is thrown.

2017-09-05 Thread Antoon Pardon
Python 2.6.4 on a solaris box. I have a program in which all kind of excptions can be thrown and caugth. The main program is something like below: try: do_stuff except Exception: log unexpected trouble Now I found the following in the logs: [Errno 131] Connection reset by peer This is a