Categories: S60 | Code Examples | Python | How To
This page was last modified 11:06, 15 April 2008.
Exception Harness
From Forum Nokia Wiki
This method is used for debugging standalone applications in PyS60
try: # Actual program is here. 1 / 0 except: import sys import traceback import e32 import appuifw appuifw.app.screen="normal" # Restore screen to normal size. appuifw.app.focus=None # Disable focus callback. body=appuifw.Text() appuifw.app.body=body # Create and use a text control. applock=e32.Ao_lock() def quit():applock.signal() appuifw.app.exit_key_handler=quit # Override softkey handler. appuifw.app.menu=[(u"Exit", quit)] # Override application menu. body.set(unicode("\n".join(traceback.format_exception(*sys.exc_info())))) applock.wait() # Wait for exit key to be pressed. appuifw.app.set_exit()
More methods for Debugging standalone applications in python can be found at Python Debugging techniques
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| registerAlarm exception | issw | Mobile Java General | 7 | 2007-04-10 15:59 |
| IOException: Bogus chunk size | kotse0 | Mobile Java Networking & Messaging & Security | 0 | 2004-03-11 09:28 |
| Exception with ISO14443Connection Connector.open and message "null" | smischi | Near Field Communication | 2 | 2008-01-21 16:31 |
| functions that leave in Symbian | ismailc | General Symbian C++ | 3 | 2007-10-28 07:47 |
| BluetoothStateException | histu | Other Programming Discussion 关于其他编程技术的讨论 | 8 | 2006-07-12 11:26 |
