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

namespace CommonHelpers {

//**************************************************************************************************
/// <summary>
/// </summary>
public static partial class HCmdLineParametersParseExceptionCreator {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="ArgumentNullException" />
public static HCmdLineParametersParseException Create(string messageFmt,params object[] parameters)
{
   HArgChecking.VerifyNotNulls( messageFmt, parameters );
   return new HCmdLineParametersParseException(string.Format( messageFmt, parameters ));
}
/// <exception cref="ArgumentNullException" />
public static HCmdLineParametersParseException Create( int zeroBasedPosition,
                                                       string messageFmt,
                                                       params object[] parameters )
{
   HArgChecking.VerifyNotNulls( messageFmt, parameters );
   return new HCmdLineParametersParseException(
      string.Format( messageFmt, parameters ), zeroBasedPosition );
}
/// <exception cref="ArgumentNullException" />
public static HCmdLineParametersParseException Create( int zeroBasedPosition,
                                                       bool isInFullCmdLinePosition,
                                                       string messageFmt,
                                                       params object[] parameters )
{
   HArgChecking.VerifyNotNulls( messageFmt, parameters );
   return new HCmdLineParametersParseException(
      string.Format( messageFmt, parameters ), zeroBasedPosition, isInFullCmdLinePosition );
}

//--------------------------------------------------------------------------------------------------

/// <exception cref="ArgumentNullException" />
public static HCmdLineParametersParseException Create(Exception error)
{
   HArgChecking.VerifyNotNulls( error );
   return new HCmdLineParametersParseException( HException.GetErrorMessage( error ) );
}
/// <exception cref="ArgumentNullException" />
public static HCmdLineParametersParseException Create(int zeroBasedPosition,Exception error)
{
   HArgChecking.VerifyNotNulls( error );
   return new HCmdLineParametersParseException( error.Message, zeroBasedPosition );
}
/// <exception cref="ArgumentNullException" />
public static HCmdLineParametersParseException Create( int zeroBasedPosition,
                                                       bool isInFullCmdLinePosition,
                                                       Exception error )
{
   HArgChecking.VerifyNotNulls( error );
   return new HCmdLineParametersParseException(
      error.Message, zeroBasedPosition, isInFullCmdLinePosition );
}

//==================================================================================================

static HCmdLineParametersParseExceptionCreator()
{
   CommonHelpers_Plus.Access();
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HCmdLineParametersParseExceptionCreator
//**************************************************************************************************

} // CommonHelpers
