Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88774
| References | <b6461fc8-a18b-4d61-86f9-65370b0a149d@googlegroups.com> <1cd0a97d-96c7-4ee6-9cfe-c0e90b9baa55@googlegroups.com> |
|---|---|
| Date | 2015-04-10 19:00 +1000 |
| Subject | Re: Exception Handling |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.199.1428656403.12925.python-list@python.org> (permalink) |
On Fri, Apr 10, 2015 at 6:39 PM, Palpandi <palpandi111@gmail.com> wrote: > Thanks for your responses. And I have one more question. > > This is the situation. A python application which reads data from one .xml file and generates some other file. Here what kind of exceptions occur? All sorts of exceptions. The best way to find out is to write your code without any try/except clauses, and then run it. When an exception happens, it'll be printed out on the console, and the program terminated. Then you can decide how your program should cope with that. Catch an exception *only* if you can actually deal with it inside your code; otherwise, just let it bubble up. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Exception Handling Palpandi <palpandi111@gmail.com> - 2015-04-09 02:31 -0700
Re: Exception Handling Chris Angelico <rosuav@gmail.com> - 2015-04-09 20:36 +1000
Re: Exception Handling Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-04-10 01:05 +1000
Re: Exception Handling dieter <dieter@handshake.de> - 2015-04-10 08:11 +0200
Re: Exception Handling Palpandi <palpandi111@gmail.com> - 2015-04-10 01:39 -0700
Re: Exception Handling Chris Angelico <rosuav@gmail.com> - 2015-04-10 19:00 +1000
Re: Exception Handling dieter <dieter@handshake.de> - 2015-04-11 07:39 +0200
csiph-web