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

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

/// <summary>
/// Property checking errors (exception creation)
/// </summary>
public static class propcheck_errors {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ArgumentException" />
public static InvalidOperationException PROPERTY_NOT_INITIALIZED( string propertyFullName ) =>
   e_invalid_operation.New(
      "Property is not initialized: “{0}”.",
      u.str_argcheck.NE( propertyFullName, nameof(propertyFullName) ) );

/// <exception cref="ArgumentException" />
public static InvalidOperationException PROPERTY_NOT_INITIALIZED( Type objectType,
                                                                  string propertyName ) =>
   PROPERTY_NOT_INITIALIZED( u.code_fmt.MemberName( objectType, propertyName ) );
/// <exception cref="ArgumentException" />
public static InvalidOperationException PROPERTY_NOT_INITIALIZED_Auto( Type objectType,
                                                                       [CallerMemberName]
                                                                       string propertyName="" ) =>
   PROPERTY_NOT_INITIALIZED( objectType, propertyName );

/// <exception cref="ArgumentNullException" />
public static InvalidOperationException PROPERTY_NOT_INITIALIZED( [u.req] MethodBase?
                                                                  propertyGetMethod ) =>
   PROPERTY_NOT_INITIALIZED( u.code_fmt.PropertyName(
      u.arg_check.NN( propertyGetMethod, nameof(propertyGetMethod) )));

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // propcheck_errors

} // user_rtx (.wasm)
