title: How to handle exceptions in MVVM View Model properties ?
body: <p>How can i handle an exception that occurs when properties in my ViewModel get occurs?  The property gets happen before the Loaded event.  For example, I have a property (get-only) that calls some data method to return a collection of states to fill a combobox's itemsource.  But sometimes SQL will not connect, and I get an exeption.  There are multiple properties like this, I want to tell the user that the combos could not be loaded correctly and then just put them back at my home screen.  However, i don'twant 5 message boxes if they all fail.  Also, why does it continue to try to get the properties, even though i told it to go to the home screen when the first exception occured?  Note: the GetStatesList() method also has try/catch and throw in the catch...</p>
  
  <pre><code>try
  {
  ObservableCollection&lt;string&gt; states=null;
  // perform sql query
  states=StateDat.Instance.GetStatesList();  //get the collection of state names
  }
  catch(Exception ex)
  {
  MessageBox.Show("Error");  //display an error message
  MessengerInstance.Send(ViewModelNamesEnum.HomeVM);  //go home
  }
  </code></pre>