Shadowrun: Awakened 29 September 2011 - Build 871
exception.py
Go to the documentation of this file.
00001 #global abc
00002 
00003 #print 'begin exception test'
00004 def test():
00005     t = 5
00006 
00007     try:
00008         x = t
00009         
00010         try:
00011             x = a
00012         except NameError as ke:
00013             print 'Inner try used'
00014     except KeyError:
00015         print 'abc key not defined'
00016         return False
00017     except Exception as e:
00018         print 'error: ' + str(e)
00019         return False
00020     else:
00021         print 'no error occurred'
00022         pass
00023 
00024     return True
00025 
00026 test()

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net