Can python ignore the error and return to the line next to the raised line and going on -


something that

try:      1/0     print "hello world"     print "every thing seems fine..."  except zerodivisionerror:      print "it not critical error, go next..."     somewayallowmetoexeuteprinthelloworld_thelinenexttotheraisedline()  except:      print "i have no idea, stop work..." 

after [1/0] raised, , [except zerodivisionerror] catched error, , return [print "hello world"] line, , going on...

you can't, , there's no reason should want to:

try:      1/0 except zerodivisionerror:     print "it not critical error, go next..."  print "hello world" print "every thing seems fine..." 

consider code:

try:      important_res = f(1/0)     send_important_message(important_res) except zerodivisionerror:      print "it not critical error, go next..."     somewayallowmetoexeuteprinthelloworld_thelinenexttotheraisedline() 

if allow execution resume, how pick value pass f?


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -