File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Source/NETworkManager.Profiles Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1084,10 +1084,18 @@ public static bool GroupExists(string name)
10841084 /// </summary>
10851085 /// <param name="name">Name of the group</param>
10861086 /// <returns>True if the group has no profiles.</returns>
1087+ /// <exception cref="ArgumentException">Thrown when name is null or empty.</exception>
1088+ /// <exception cref="InvalidOperationException">Thrown when group with specified name is not found.</exception>
10871089 public static bool IsGroupEmpty ( string name )
10881090 {
1091+ ArgumentException . ThrowIfNullOrWhiteSpace ( name ) ;
1092+
10891093 var group = LoadedProfileFileData . Groups . FirstOrDefault ( x => x . Name == name ) ;
1090- return group ? . Profiles . Count == 0 ;
1094+
1095+ if ( group == null )
1096+ throw new InvalidOperationException ( $ "Group '{ name } ' not found.") ;
1097+
1098+ return group . Profiles . Count == 0 ;
10911099 }
10921100
10931101 #endregion
You can’t perform that action at this time.
0 commit comments