Ignoring an error message to continue with the loop in python : <p>I am using a Python script for executing some function in Abaqus. Now, after running for some iterations Abaqus is exiting the script due to an error.</p>

<p>Is it possible in Python to bypass the error and continue with the other iterations?</p>

<p>The error message is </p>

<pre><code>#* The extrude direction must be approximately orthogonal
#* to the plane containing the edges being extruded.
</code></pre>

<p>The error comes out for some of the iterations, I am looking for a way to ignore the errors and continue with the loop whenever such error is encountered.</p>

<p>The for loop is as given;</p>

<pre><code>for i in xrange(0,960):
    p = mdb.models['Model-1'].parts['Part-1']
    c = p.cells
    pickedCells = c.getSequenceFromMask(mask=('[#1 ]', ), )
    e, d1 = p.edges, p.datums
    pickedEdges =(e[i], )
    p.PartitionCellByExtrudeEdge(line=d1[3], cells=pickedCells, edges=pickedEdges, 
    sense=REVERSE)
</code></pre>

<p>Is this doable? Thanks!</p>
