diff --git a/BlazorSortableList.Lib/SortableList.razor.cs b/BlazorSortableList.Lib/SortableList.razor.cs index 313991f..66388ab 100644 --- a/BlazorSortableList.Lib/SortableList.razor.cs +++ b/BlazorSortableList.Lib/SortableList.razor.cs @@ -127,8 +127,8 @@ public void OnUpdateJS(int oldIndex, int newIndex, string fromId) { if (DefaultSort) { - throw new ArgumentException( - "It must be defined as either {nameof(OnUpdate)} or {nameof(DefaultSort)}, but not both together."); + throw new InvalidOperationException( + $"It must be defined as either {nameof(OnUpdate)} or {nameof(DefaultSort)}, but not both together."); } // invoke the OnUpdate event passing in the oldIndex and the newIndex