2010-09-07 108 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

我只是需要在這些例外後返回。咄。抱歉。