Displaying (non-data) errors like Server-not-found ?

Topics: Questions
Aug 30, 2012 at 6:35 AM


I am using Catel on the UI layer, but CSLA.NET to do the business stuff.
The ViewModel base is provided by CSLA, and I prefer to use this instead of Catels one.
It provides very convenience methods to work with the CSLA business layer.
Of course, I've implemented Catels IViewModel on CSLAs ViewModelBase. 

Now, because of the multi layer architecture, it may occur that the client cannot fetch data caused by several reasons. For example the server could be down. 
The ViewModel has an Error property which exposes the exception with the error details.
On updates of this property, INotifyPropertyChanged will be raised.

Is there a given way to display such error conditions by Catel?
Should the be displayed by the InfoBarMessageControl, and if so, how?
Or should I implement an ErrorDisplayService for these conditions? 

Any idea?
Thanks. Alex. 

Aug 30, 2012 at 5:55 PM

For errors such as "server not found", I recommend that you use the IMessageService. Data errors such as "field x is required" can be displayed by the InfoBarMessageControl, but I recommend that you show other errors as real message to the users.