开发者

Android Error handling - Sorry - The application has stopped unexpectedly

开发者 https://www.devze.com 2023-01-15 06:02 出处:网络
I\'ve got it wrapped in a try catch, but the exception still trips that ugly screen. URL u = null; try {

I've got it wrapped in a try catch, but the exception still trips that ugly screen.

 URL u = null;
    try {
      u = new URL(txturl.getText().toString());
        }
    catch (MalformedURLException e) {
     ReportError(e,"Unable to connect to "+u);

    }

calls this:

    private void ReportError(Exception e, String message){
Display(message+" - "+ e.getMessage().toString());
System.out.println(">>>>>>>>>>>>>>>>>>>>> "+message+" - "+e.getMessage().toString());printStackTrace();

}

Any way around this. It happens on the Android 2.2 emulator with Eclipse and on my Sprint Hero.

Do开发者_如何学C I have to validate the form?

Thanks.


I just needed to return after these exceptions. duh. sorry.

0

精彩评论

暂无评论...
验证码 换一张
取 消