Catch exception
<p>folks!
I got Activity, in onCreate() i try to fetch data:</p>

<pre><code>protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        ...............
        fillUI();
    }

 public void getDetailedItem(){
        FeedParser parser=new FeedParser();
        try{
           mItem=parser.parseDetailed();
        }catch(Exception e){
            closeAndShowError();
        }
    }

    public void fillUI(){
        getDetailedItem();
        if(mItem!=null){
        ...............
        }else{
          closeAndShowError();
        }
    }

private void closeAndShowError(){
        Context context = getApplicationContext();
        CharSequence text = getResources().getString(R.string.toast_error);
        int duration = Toast.LENGTH_SHORT;

        Toast toast = Toast.makeText(context, text, duration);
        toast.show();

        finish();
    }
</code></pre>

<p>Them problem is, when Exception occures, it is caught, and I expect my activity to finish itself, but I still get code inside fillUI() executed, so I had to put if statement after getDetailedItem();
How do I solve it?</p>
