Skip to content

Commit c804a19

Browse files
committed
Generic Button: Improved error message for missing DisplayItem or CommandItem conversation.
1 parent b379c92 commit c804a19

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

StreamDeckSimHub.Plugin/ActionEditor/ViewModels/SettingsViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ private DisplayItemViewModel DisplayItemToViewModel(DisplayItem displayItem)
204204
DisplayItemImage img => new DisplayItemImageViewModel(img, _imageManager, this),
205205
DisplayItemText txt => new DisplayItemTextViewModel(txt, this),
206206
DisplayItemValue val => new DisplayItemValueViewModel(val, this),
207-
_ => throw new InvalidOperationException("Unknown DisplayItem type.")
207+
_ => throw new InvalidOperationException($"Unknown DisplayItem type: {displayItem.GetType().FullName}")
208208
};
209209
}
210210

@@ -274,7 +274,7 @@ private CommandItemViewModel CommandItemToViewModel(CommandItem commandItem, Str
274274
roleVm.SetAvailableRoles(_availableSimHubRoles);
275275
return roleVm;
276276
default:
277-
throw new InvalidOperationException("Unknown CommandItem type.");
277+
throw new InvalidOperationException($"Unknown CommandItem type: {commandItem.GetType().FullName}");
278278
}
279279
}
280280

0 commit comments

Comments
 (0)