java - Handle Exception with error dialog in asynctask -
i making rss android app pull reload. want use asynctask. here code: class refresh extends asynctask<string,void,void>{ @override protected void doinbackground(string... params) { try { download(getresources().getstring(r.string.link)); }catch (exception e){ createneterrordialog(); } return null; } @override protected void onpostexecute(void avoid) { super.onpostexecute(avoid); try{ views(); }catch (exception e){ toast.maketext(mainactivity.this, "error", toast.length_long).show(); cancel(true); } lstpost.setonitemclicklistener(new adapterview.onitemclicklistener() { @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { intent intent = new intent(mainac...