using System.Collections.Generic; namespace System.Net.HomeMatic.Exceptions { public class Exception_MissingArgument : Exception { public Exception_MissingArgument(string[] RequiredArguments) : base("The called Api Function requires arguments: "+ String.Join(", ",RequiredArguments)) { } public Exception_MissingArgument(string[][] RequiredArguments) : base("The called Api Function requires arguments: " + sJoin(RequiredArguments)) { } public static string sJoin(string[][] s2) { List res = new List(); foreach (string[] s1 in s2) { res.Add(String.Join(" or ", s1)); } return String.Join(", ", res.ToArray()); } } }