w chun wrote:
> if your app is willing to tolerate errors/crashes, then i would take
> alan's advice and just letting the errors happen, as opposed to being
> so careful with (and integrating Kent's suggestion for the full
> traceback with):
>
> try:
> BLOCK
> except Exception, e:
> print
On 10/26/05, nephish <[EMAIL PROTECTED]> wrote:
> Yeah, cool. i am just starting this part.
> i am glad i started with python.
> thanks for the help
if your app is willing to tolerate errors/crashes, then i would take
alan's advice and just letting the errors happen, as opposed to being
so carefu
nephish wrote:
> Hey there,
> i am writing some (for me) pretty complicated stuff for work that
> really needs to work.
> i have looked at exception handling in the Learning Python book.
> and i am using some try / except statements.
> the problem is, that even though my script
> and i am using some try / except statements.
> the problem is, that even though my script does not crash, i dont know
> the exact error.
IT sounds like your try/except is masking the error.
Its usually a good idea to NOT Use try/except when developing your
code, then go back and put it in whe
Yeah, cool. i am just starting this part.
i am glad i started with python.
thanks for the help
sk
On Wed, 2005-10-26 at 21:32 -0700, w chun wrote:
> > i am writing some (for me) pretty complicated stuff for work that
> > really needs to work.
> > i have looked at exception handlin
> i am writing some (for me) pretty complicated stuff for work that
> really needs to work.
> i have looked at exception handling...
> and i am using some try / except statements.
> the problem is, that even though my script does not crash, i dont know
> the exact error.
>
Thanks Hugo,
Now that i know where to look
appreciate your help.
-sk
On Wed, 2005-10-26 at 21:27 -0600, Hugo González Monteverde wrote:
> Yes,
>
> You can catch an error object along with the exception, as in:
>
> try:
> fileo = open("nofile")
> except IOError, e:
> print "Alas...
Yes,
You can catch an error object along with the exception, as in:
try:
fileo = open("nofile")
except IOError, e:
print "Alas...", e
As you see, the error object has a string representation equal wo what
normally the python interpreter prints...
>>>
Alas... [Errno 2] No such file o