//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// 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 math_argcheck_errors {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
public static string PN( string? paramName ) => paramName ?? "value";
//==================================================================================================

public static ArgumentOutOfRangeException NAN_VALUE_IS_NOT_ADMISSIBLE( string paramName ) =>
   new ArgumentOutOfRangeException( PN(paramName),
      "NaN-value is not admissible." );

public static ArgumentOutOfRangeException INCORRECT_MIN_MAX( string minParameterName,
                                                             string maxParameterName ) =>
   new ArgumentOutOfRangeException(
      $"Value of “{minParameterName}” parameter must be less than or equal to value of "+
      $"“{maxParameterName}” parameter." );

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // math_argcheck_errors

} // user_rtx (.wasm)
