×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    2

    how to get the infomation that print by e.printStackTrace() on a real device

    hi,all
    My MIDlet run very well on emulator, but sometime it throw some exceptions when run on a real device(such as NOKIA6680).so I want to get the Stack infomation when a exception been throwed,something like e.printStackTrace(). but how can i make the infomation display on the real device?
    can you heard me?

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: how to get the infomation that print by e.printStackTrace() on a real device

    Hi,

    If ur phone supports jsr-75 then u can save the error messages to files in the filesystem of the phone using fileconnection.
    Jsr - 75 is supported in 6680 and so u can write it to the filesystem.

    here is a tutorial of how to use fileconnection using jsr-75.
    http://www.forum.nokia.com/info/sw.n..._v1_1.zip.html



    Regards,
    Wang

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    2

    Re: how to get the infomation that print by e.printStackTrace() on a real device

    Thank you, Wang shui.
    but i think the key problem is that how can i redirect the System.err to a file Stream. By this way, the printStackTrace() will print in the fileStream.

  4. #4
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: how to get the infomation that print by e.printStackTrace() on a real device

    Hi PCS,
    As your phone supports file access,then you can write the logs into the filesystem.just append the string and set a fileconnection and then write the string to a text in the filesystem.Also file.debugWrite() will do this for you.

    Thanks
    Soku

  5. #5
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: how to get the infomation that print by e.printStackTrace() on a real device

    Insted of using printStackTrace() you could use toString() or getMessage(). and show this in an alert or store in a filesystem (or rms, but then you need another midlet to access the rms). Of course you get less information than with stack trace.

    Hartti

Similar Threads

  1. Sending an image over email
    By jeclarim in forum Symbian
    Replies: 3
    Last Post: 2006-12-15, 20:25
  2. Bluetooth Security: What exactly is an untrusted device?
    By rahulmcs in forum Bluetooth Technology
    Replies: 1
    Last Post: 2005-12-02, 06:26
  3. Connect emulated device via Bluetooth to a real device
    By ulimativ in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-06-17, 17:54
  4. Emulator / Real Device Selection
    By sblider in forum Symbian
    Replies: 1
    Last Post: 2004-04-10, 13:26
  5. LOADING hayes.tsy FAILED IN REAL DEVICE 7650
    By rsajithali in forum Symbian
    Replies: 1
    Last Post: 2003-05-05, 08:35

Posting Permissions

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