Exception Handling

I

ias0nas

Hello,

Is it possible to bypass an exception and continue the code?
If the exception is being raised in a while statement is it possible to
bypoass it and continue with the next while?

Thank you
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Is it possible to bypass an exception and continue the code?
If the exception is being raised in a while statement is it possible to
bypoass it and continue with the next while?

while True:
some_action()
try:
some_other_action_raising_KeyError()
except KeyError:
pass
continue_after_exception_has_passed_by()

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,228
Messages
2,571,157
Members
47,785
Latest member
deepusaini

Latest Threads

Top