Closed iv-mexx closed 9 years ago
The primary reason is that RVMViewModel
does not itself generate any errors, so it wouldn't make much sense to have RVMViewModel.errors
.
It's easier for subclasses (perhaps even a project-specific base class) to declare themselves.
Ok, thanks for the answer.
perhaps even a project-specific base class
Thats what I've been doing but the error handling was the only thing added to my own base class, so I was wondering why it was not part of RVMViewModel already.
This is just a quick question:
I have noticed that in the GroceryList, the
GCYViewModel
class inherits fromRVMViewModel
and adds theerrors
signal.Is there a specific reason why this kind of error handling is not part of
RVMViewModel
directly?Maybe its because the assumption, that all errors are handled equally (e.g. just display the error message on the screen) is too specific and its best practice to just subscribe to the error event of each Action of a viewModel individually and handle the error of that Action individually?