×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    77

    How to handle Symbian errors with try: except: ?

    Python has a way to handle exceptions with the try: and except: statements. It is possible to name a specific exception with the except: statement to handle specific exceptions e.g. to handle a division by zero with 'except ZeroDivisionError:'. Exceptions not matching the exception specified in the except: clause are passed on to outer try: statements. I found no way to use Symbian specific error values with the except: statement e.g. 'except KErrNotFound:'

    How can Symbian specific error values (e.g. KErrNotFound) be used within an except: statement?

    Thanks for any hints
    Martin

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,801

    Re: How to handle Symbian errors with try: except: ?

    Check if the following works for KErrNotFound,
    Code:
    except OSError:
        (exc_type, exc_value, exc_traceback) = sys.exc_info()
        print unicode(ec_type)
        print unicode(ec_traceback)
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. Symbian C++ - Getting Link Errors.
    By periakaruppan in forum Nokia M2M
    Replies: 0
    Last Post: 2005-05-06, 09:39
  2. Symbian C++ - Getting Link Errors.
    By periakaruppan in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-05-06, 09:32
  3. Replies: 2
    Last Post: 2003-08-19, 16:39
  4. setting of Series 60 MIDP SDK for Symbian OS version 1.2 for networking
    By servigo in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2003-07-31, 07:47
  5. Replies: 0
    Last Post: 2003-06-13, 01:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×