Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20462

Re: atexit.register in case of errors

From Miki Tebeka <miki.tebeka@gmail.com>
Newsgroups comp.lang.python
Subject Re: atexit.register in case of errors
Date 2012-02-15 10:40 -0800
Organization http://groups.google.com
Message-ID <16963932.42.1329331200261.JavaMail.geo-discussion-forums@ynje6> (permalink)
References <mailman.5827.1329311531.27778.python-list@python.org>

Show all headers | View raw


Another option is to use a global error flag and set it in sys.excepthook (see http://docs.python.org/library/sys.html#sys.excepthook).

goodbye will check the error flag and skip execution if error flag is set.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 13:12 +0000
  Re: atexit.register in case of errors Mel Wilson <mwilson@the-wire.com> - 2012-02-15 08:33 -0500
    Re: atexit.register in case of errors Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-02-15 08:52 -0500
      Re: atexit.register in case of errors Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-02-15 16:18 +0100
        Re: atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 15:41 +0000
    Re: atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 14:35 +0000
  Re: atexit.register in case of errors Miki Tebeka <miki.tebeka@gmail.com> - 2012-02-15 10:40 -0800
  Re: atexit.register in case of errors Miki Tebeka <miki.tebeka@gmail.com> - 2012-02-15 10:40 -0800

csiph-web