<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using continue in a try statement in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116411#M389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: MCline19&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible at all to use "continue" in a try statement.&amp;nbsp; I am repeatedly getting the error: "***'continue' not properly in loop([filename], line 67); however, I can not figure out how to "properly" fit it in the loop.&amp;nbsp; My current code is below.&amp;nbsp; Any help would be greatly appreciated! Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;try:
 print ("Beginning temporary file removal")
 for x in sdeFiles:
&amp;nbsp; n = x.split('.')[-1]
&amp;nbsp; for e in fileExtns:
&amp;nbsp;&amp;nbsp; delExtns = n + e
&amp;nbsp;&amp;nbsp; delFile = 'G://GISAdmin//SDE_Backups//NewTempShapefiles//' + delExtns
&amp;nbsp;&amp;nbsp; os.remove(delFile)
 print ("Temporary files deleted")
except:
 print ("Error: " + extension + " does not exist")
 continue
finally:
 print ("Delete complete")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:51:12 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-11T06:51:12Z</dc:date>
    <item>
      <title>Using continue in a try statement</title>
      <link>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116411#M389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: MCline19&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible at all to use "continue" in a try statement.&amp;nbsp; I am repeatedly getting the error: "***'continue' not properly in loop([filename], line 67); however, I can not figure out how to "properly" fit it in the loop.&amp;nbsp; My current code is below.&amp;nbsp; Any help would be greatly appreciated! Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;try:
 print ("Beginning temporary file removal")
 for x in sdeFiles:
&amp;nbsp; n = x.split('.')[-1]
&amp;nbsp; for e in fileExtns:
&amp;nbsp;&amp;nbsp; delExtns = n + e
&amp;nbsp;&amp;nbsp; delFile = 'G://GISAdmin//SDE_Backups//NewTempShapefiles//' + delExtns
&amp;nbsp;&amp;nbsp; os.remove(delFile)
 print ("Temporary files deleted")
except:
 print ("Error: " + extension + " does not exist")
 continue
finally:
 print ("Delete complete")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116411#M389</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T06:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using continue in a try statement</title>
      <link>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116412#M390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: mzcoyle&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once it has exited the try statement, it will not return to it. To accomplish this you would have to put your try/except inside your loop to continue executing in spite of errors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 12:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116412#M390</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-11T12:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using continue in a try statement</title>
      <link>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116413#M391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;continue needs to be in a loop such as a "while" loop, it can't be used on its own&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 12:50:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116413#M391</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2012-07-11T12:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using continue in a try statement</title>
      <link>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116414#M392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: MCline19&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Works perfectly now!&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 13:09:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/using-continue-in-a-try-statement/m-p/116414#M392</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-11T13:09:24Z</dc:date>
    </item>
  </channel>
</rss>

