2010-09-07 104 views
0

我已经将它包装在try catch中,但异常仍然会跳出那个丑陋的屏幕。Android错误处理 - 对不起 - 应用程序意外停止

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

    } 

称此为:

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

}

迂回方式。它发生在使用Eclipse和我的Sprint Hero的Android 2.2模拟器上。

我必须验证表单吗?

谢谢。

+0

您如何向我们展示堆栈跟踪? – smith324 2010-09-07 01:32:25

回答

0

我只是需要在这些例外后返回。咄。抱歉。