title: Error Handling in Python that can detect program status
body: <p>I am really new to Python. I would like to create a <strong>logical loop</strong> for my python script where when the program stuck it will automatically jump to next line and continue the program.</p>
  
  <p>Here is an example of my code which was a series of different combination of parameter values. I am aware that some combinations of parameter may crash the program that's why I want to have a Error Handling loop to keep the program running. </p>
  
  <pre><code>   ini_file="model-simulation fL=0.1,fks=1,fno=1,fnc=1,fr=1,fs=1.ini"; pytopkapi.run(ini_file)
     ini_file="model-simulation fL=0.1,fks=6,fno=1,fnc=1,fr=1,fs=1.ini"; pytopkapi.run(ini_file)
     ini_file="model-simulation fL=0.1,fks=11,fno=1,fnc=1,fr=1,fs=1.ini"; pytopkapi.run(ini_file)
     ini_file="model-simulation fL=0.1,fks=16,fno=1,fnc=1,fr=1,fs=1.ini"; pytopkapi.run(ini_file)
     ini_file="model-simulation fL=0.1,fks=21,fno=1,fnc=1,fr=1,fs=1.ini"; pytopkapi.run(ini_file)
     ini_file="model-simulation fL=0.1,fks=26,fno=1,fnc=1,fr=1,fs=1.ini"; pytopkapi.run(ini_file)
  </code></pre>
  
  <p>Sometimes it will have error messages like the following picture which stops the whole program. Could someone please help me out? <img src="https://i.stack.imgur.com/URHw3.png" alt="enter image description here"></p>