Better exception handling for ViewModel resolution