//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// UserRTX.NET satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;

#if !WASM
namespace user_rtx { using u = user_rtx;
#else
namespace user_rtx.wasm { using u = user_rtx.wasm;
#endif

/// <summary>
/// Array argument checking errors (exception creation)
/// </summary>
public static partial class array_argcheck_errors {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public static string PN( string? paramName ) => paramName ?? "value";
//==================================================================================================

public static ArgumentException ZERO_BASED_ARRAY_WAS_EXPECTED( string? paramName ) =>
   new ArgumentException(
      "Zero based array was expected.",
      PN(paramName) );
public static ArgumentException SINGLE_DIMENSION_ARRAY_WAS_EXPECTED( string? paramName ) =>
   new ArgumentException(
      "Single dimension array was expected.",
      PN(paramName) );

public static ArgumentException NONEMPTY_ARRAY_WAS_EXPECTED( string? paramName ) =>
   new ArgumentException(
      "Non-empty array was expected.",
      PN(paramName) );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // array_argcheck_errors

} // user_rtx (.wasm)
