From 1ef026d8858acb5001b0b362672b8a1975d03f7e Mon Sep 17 00:00:00 2001 From: Kebechet Date: Sat, 25 Jul 2026 19:32:03 +0200 Subject: [PATCH] Interpolate the OnUpdate/DefaultSort conflict message --- BlazorSortableList.Lib/SortableList.razor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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