Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unhandled Exception : close application

 
chandrap prakash
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my application,using browse functionality i am trying to select a file from native directory of a device.I tested this functionality on sony and LG mobile,functionality works fine.

When i test the same application on Nokia E60 mobile on selection of a file,it throws "Unhandled Exception" .

I tried to put the code in try and catch block, to print the message then i got null.

following is the j2me code:

try
{
pictureURI.setString("");
pictureURI.setString(url);
display.setCurrent(detailsForm);
}

catch (Exception e)
{
System.out.println(e);
showAlert("Exception ===="+e.getMessage());
}

What is the issue i am not understanding.

Thanks & Regards,

Chandra Prakash
 
Gopinath Karyadath
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai

I tested with Nokia E61 there is no error found !

code : -


import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.*;

/**
* @author gopi
*/
public class Midlet extends MIDlet {
public void startApp() {
TextField pictureURI ;
pictureURI = new TextField("URL :", "", 60, TextField.ANY) ;
Form detailsForm = new Form("URL") ;
Display display ;
display = Display.getDisplay(this);
String url ="" ;
try
{
pictureURI.setString("");
pictureURI.setString(url);
display.setCurrent(detailsForm);
}

catch (Exception e)
{
System.out.println(e);
System.out.println("Exception ===="+e.getMessage()) ;

}



}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}
}


if you want to test with other nokia handset please go to http://apu.ndhub.net/devices


Regards
Gopinath





 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic