Sections
Timeline
View Tickets
New Ticket
Sub-Sections
Download
Unified Diff
Zip Archive
Metanav
Preferences
About Trac
Links
Slowchop Studios
Gerald Kaszuba
Advertisement

Changeset 68

Show
Ignore:
Timestamp:
06/07/08 10:24:43 (7 weeks ago)
Author:
gak
Message:
  • Exceptions are handled
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/scripts/pycg

    r67 r68  
    133133    print('Starting trace') 
    134134 
     135reraise = False 
     136 
    135137pycallgraph.start_trace( 
    136138    filter_func=filter_func, 
     
    143145    # Ignore it when the script calls os.exit() so we can still make the graph. 
    144146    pass 
     147except Exception, e: 
     148    reraise = True 
     149    if not options.quiet: 
     150        print('Caught exception, will raise after graph is made.') 
    145151 
    146152options = __pygc_options.pop() 
     
    150156 
    151157pycallgraph.make_dot_graph(options.image_file, options.format, options.tool) 
     158     
     159if reraise: 
     160    if not options.quiet: 
     161        print('Done and raising the caught exception:') 
     162    raise e 
    152163 
    153164if not options.quiet: