<?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 Re: How do I handle my own exceptions and get the excetion to run another prodcure? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193006#M14824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great news; good luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 06:51:54 GMT</pubDate>
    <dc:creator>StacyRendall1</dc:creator>
    <dc:date>2011-09-28T06:51:54Z</dc:date>
    <item>
      <title>How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/192998#M14816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm attempting to run a script in Python 2.6 referencing ArcGIS 10. I got the script to run but then I decided to use the try and except method and handle multiple exceptions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However as soon as I started doing this I'm getting the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;except EXCEPTION:
NameError: global name 'EXCEPTION' is not defined&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;I think I need to define a class but I'm not sure how that would relate to then running an additional procedure. The idea of the programme is to create a backup of 3 feature classes and if errors occur, pass them to the error exception procedure. This then prints an error message and calls the procedure to restart the map services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The section of code is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; print "\n5. Now renameing " + TABLE_OWNER + SDE_FC_CURRENT + " to " + TABLE_OWNER + SDE_FC_BACKUP + " providing no lock exists"
&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.Exists(TABLE_OWNER + SDE_FC_CURRENT) ==1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Rename_management (TABLE_OWNER + SDE_FC_CURRENT,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TABLE_OWNER + SDE_FC_BACKUP)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "test " + EXCEPTION
&amp;nbsp;&amp;nbsp;&amp;nbsp; except EXCEPTION:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.TestSchemaLock(TABLE_OWNER + SDE_FC_CURRENT) ==0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTION(LOCK_ERROR_TEXT, SDE_FC_CURRENT)
&amp;nbsp;&amp;nbsp;&amp;nbsp; except LOCK_ON_BACKUP:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.TestSchemaLock(TABLE_OWNER + SDE_FC_BACKUP) ==0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTION(LOCK_ERROR_TEXT, SDE_FC_BACKUP)
&amp;nbsp; except UNKNOWN_ERROR2:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.Exists(TABLE_OWNER + SDE_FC_CURRENT) ==0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXCEPTION(UNKNOWN_ERROR, SDE_FC_CURRENT + " and " + SDE_FC_BACKUP)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;I hope that is enough code. I can supply more if required.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 14:38:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/192998#M14816</guid>
      <dc:creator>TimLangner</dc:creator>
      <dc:date>2011-09-23T14:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/192999#M14817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you checked this page out?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.python.org/tutorial/errors.html"&gt;http://docs.python.org/tutorial/errors.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 22:14:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/192999#M14817</guid>
      <dc:creator>ChrisBater</dc:creator>
      <dc:date>2011-09-23T22:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193000#M14818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know what the rest of your code looks like, but I'm not sure I get exactly what you are trying to do (you seem to want to raise and handle your exception in the same place).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will need to define your own Exception class, and then a module that &lt;/SPAN&gt;&lt;STRONG&gt;raise&lt;/STRONG&gt;&lt;SPAN&gt;s the exception if something goes wrong, then the place that calls that module must be within a &lt;/SPAN&gt;&lt;STRONG&gt;try...except&lt;/STRONG&gt;&lt;SPAN&gt; statement which handles the exception. Here is a simple example of the most trivial error raising program; which will catch some common errors when attempting to read a text file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os

class fileLoaderErrors(Exception):
 '''error handling; error code:
 0 - path doesn't exist
 1 - extension isn't correct
 '''
 def __init__(self, errorCode, filePath):
&amp;nbsp; self.errorCode = errorCode
&amp;nbsp; self.filePath = filePath
 def __str__(self):
&amp;nbsp; if self.errorCode == 0:
&amp;nbsp;&amp;nbsp; errorStr =&amp;nbsp; 'File does not exist at specified path: %s' % self.filePath
&amp;nbsp; elif self.errorCode == 1:
&amp;nbsp;&amp;nbsp; errorStr = 'File extension is not correct, .txt is required, file provided: %s' % self.filePath
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp; errorStr = 'Unknown error with %s' % self.filePath 
&amp;nbsp; return errorStr


def fileOpener(filePath):
 '''stupid little module to load a file if it exists and the extension is correct, otherwise throw an exception'''
 if os.path.exists(filePath):&amp;nbsp; 
&amp;nbsp; if filePath.find('.txt') != -1: 
&amp;nbsp;&amp;nbsp; return open(filePath)&amp;nbsp; 
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp; raise fileLoaderErrors(1, filePath) 
 else:
&amp;nbsp; raise fileLoaderErrors(0, filePath)


if __name__ == "__main__":
 path = 'D:\\Temp\\new2.txt'
 try:
&amp;nbsp; fObj = fileOpener(path)
 except fileLoaderErrors: # if there is an error, couln't load file...
&amp;nbsp; print 'Unable to load file: %s' % path
&amp;nbsp; fObj = None
 
 if fObj is not None: # if could open file, print contents and close...
&amp;nbsp; for line in fObj:
&amp;nbsp;&amp;nbsp; print line
&amp;nbsp; fObj.close()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that because I am catching my custom exception from the module it doesn't matter what the error message was, the program will go on to do its thing. This, however, won't catch other exceptions (such as forgetting the import os line at the top of the script).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code for what I &lt;/SPAN&gt;&lt;STRONG style="font-style: italic;"&gt;think&lt;/STRONG&gt;&lt;SPAN&gt; you are trying to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;class LockError(Exception):
 def __init__(self, file):
&amp;nbsp; self.file = file
 def __str__(self):
&amp;nbsp; return&amp;nbsp; 'Error: could not obtain lock on %s' % (self.file)

class UnknownError(Exception):
 def __init__(self, file):
&amp;nbsp; self.file = file
 def __str__(self):
&amp;nbsp; return&amp;nbsp; 'Error: %s does not exist %s' % (self.file)

&amp;nbsp; 
def fileRenamer(TABLE_OWNER, SDE_FC_CURRENT, SDE_FC_BACKUP):
 print "\n5. Now renaming " + TABLE_OWNER + SDE_FC_CURRENT + " to " + TABLE_OWNER + SDE_FC_BACKUP + " providing no lock exists"

 if arcpy.Exists(TABLE_OWNER + SDE_FC_CURRENT) : # test if CURRENT exists
&amp;nbsp; 
&amp;nbsp; if arcpy.TestSchemaLock(TABLE_OWNER + SDE_FC_CURRENT)&amp;nbsp; and arcpy.TestSchemaLock(TABLE_OWNER + SDE_FC_BACKUP) : # test locking both
&amp;nbsp;&amp;nbsp; arcpy.Rename_management (TABLE_OWNER + SDE_FC_CURRENT, TABLE_OWNER + SDE_FC_BACKUP) # perform rename
&amp;nbsp; 
&amp;nbsp; elif not arcpy.TestSchemaLock(TABLE_OWNER + SDE_FC_CURRENT) : # if CURRENT couldn't be locked, raise the exception
&amp;nbsp;&amp;nbsp; raise LockError(SDE_FC_CURRENT)
&amp;nbsp; 
&amp;nbsp; elif not arcpy.TestSchemaLock(TABLE_OWNER + SDE_FC_BACKUP) : # if it was BACKUP that couldn't be locked, raise the exception
&amp;nbsp;&amp;nbsp; raise LockError(SDE_FC_BACKUP)
&amp;nbsp;&amp;nbsp; 
 elif not arcpy.Exists(TABLE_OWNER + SDE_FC_CURRENT) : # CURRENT doesn't exist, raise the exception
&amp;nbsp; raise UnknownError(SDE_FC_CURRENT)

&amp;nbsp; 
if __name__ == "__main__":
 table_owner = '...'
 sde_fc_current = '...'
 sde_fc_backup = '...'
 fileRenamer(table_owner, sde_fc_current, sde_fc_backup)&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;which will trow exceptions (displaying the relevant error messages). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In reality you want to handle those exceptions as well, so you will need to replace the last line with these lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;try:
 fileRenamer(table_owner, sde_fc_current, sde_fc_backup)
except LockError: # if it has the lock error
 print 'Error obtaining lock on one of the data-sets during backup, attempting something else...'
 # Doing something else goes here...
except UnknownError: # if it was the unknown error
 print 'Error with CURRENT SDE - it does not exist'
 # Do something else here, or whatever...&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may even want to create different exceptions, depending on if it is the CURRENT or BACKUP features which is locked...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know how you get on!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:41:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193000#M14818</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2021-12-11T09:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193001#M14819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your reply Stacy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will study what you have written closely.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to handle all my exceptions in their own procedure. So each type of error goes to the procedure, which is a standard procedure that prints an error message and then restarts all the map services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not 100% certain how the class and def __init__ works. I've seen various bits of code but I guess the issue is I don't understand what __init__ means theoretically for Python and thus I don't understand how to use it. Lots of places give the theoretical code for exceptions and then an example but not necessarily the meaning behind the code. However I'm now browsing the term __init__ and that should greatly help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wasn't expecting to get into this area so quickly. I'll probably buy a book on python but right now I don't have time to wait for one to turn up. Would be great if ESRI published one. The section in ModelBuilder is far to short. They need something like the Apress book for Oracle Spatial, which I own and found extremely useful when completing my masters dissertation. Expect when I wanted to add an obsolete Ordnance Survey project into Oracle that is......&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2011 08:09:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193001#M14819</guid>
      <dc:creator>TimLangner</dc:creator>
      <dc:date>2011-09-26T08:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193002#M14820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've read through various web sites and Stacys helpful reply. However if I implement Stacys code then only an error message is displayed. However whilst I need an error message, I also need some code to run that brings up the map services after the error message is displayed or just before, if it can't be after.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got the code to bring up the map services but I am not sure how I call this via an exception as all the exceptions I've seen, seem to just print an error message and do nothing else afterwards. I know how to do this in PL/SQL but this is different way of working to that and I can't figure it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2011 11:25:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193002#M14820</guid>
      <dc:creator>TimLangner</dc:creator>
      <dc:date>2011-09-26T11:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193003#M14821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry I rewrote my message when I read though it again. It seems I can call something else but I don't do it in the same place as the error exception handling, In PL/SQL I could call a procedure a raise but in Python, you call an exception and then do something else after the exception has been called. So they are separate parts of code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2011 11:28:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193003#M14821</guid>
      <dc:creator>TimLangner</dc:creator>
      <dc:date>2011-09-26T11:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193004#M14822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Tim,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know much about the theory behind classes, but I did a bit of GUI stuff in Python at one stage, and they rely pretty heavily on classes. As a result I kind of got my head around how to use them, if not exactly why...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;STRONG style="font-style: italic;"&gt;__init__&lt;/STRONG&gt;&lt;SPAN&gt; part runs when the class is first called (initialized); here it just maps the inputs to local variables (things starting with &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;). It is not particularly meaningful in this instance, and perhaps not even necessary, but all the examples I found seem to it... The &lt;/SPAN&gt;&lt;STRONG style="font-style: italic;"&gt;__str__&lt;/STRONG&gt;&lt;SPAN&gt; part defines the string to return. Python will perform different actions depending on the type of class; so I guess an exception class does the __init__ then the __str__ all at once when called. If you have other functions within the class, they must be explicitly called. Other classes often work like this (entered at the command line, give it a go):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; class myClass():
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "class initialised..."
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def myDef(self, arg):
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "function called with: %s " % (arg)
...
&amp;gt;&amp;gt;&amp;gt; c = myClass()
class initialised...
&amp;gt;&amp;gt;&amp;gt; c.myDef('Hello')
'function called with: Hello'&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I think what you need to do is have your restart map servers command in a function that is called if your rename (or whatever) function raises an exception...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:41:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193004#M14822</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2021-12-11T09:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193005#M14823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Stancy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your reply. I solved the problem in the end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In an exception statement I can have multiple if and else statements, which I can use to trap my exceptions and call the procedures that I have written to handle them. Thus I don't need to create my own exception classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a simpler solution and works for the time scale I have. May be one day I'll have time to get my head about creating my own exceptions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 12:17:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193005#M14823</guid>
      <dc:creator>TimLangner</dc:creator>
      <dc:date>2011-09-27T12:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I handle my own exceptions and get the excetion to run another prodcure?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193006#M14824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Great news; good luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 06:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-handle-my-own-exceptions-and-get-the/m-p/193006#M14824</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2011-09-28T06:51:54Z</dc:date>
    </item>
  </channel>
</rss>

