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

#if !WASM
namespace CommonHelpers {
#else
namespace CommonHelpers.WASM {
#endif

//**************************************************************************************************
/// <summary>
/// </summary>
public partial class HAppExitException: HEscapeException {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public HAppExitException()
   :base ( (string)null, new AppExitData() ) {}

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

public HAppExitException(string message)
   :base ( message, new AppExitData() ) {}

public HAppExitException(string message,Exception innerException)
   :base ( message, innerException, new AppExitData() ) {}

public HAppExitException(string message,int exitCode)
   :base ( message, new AppExitData(exitCode) ) {}

public HAppExitException(string message,Exception innerException,int exitCode)
   :base ( message, innerException, new AppExitData(exitCode) ) {}

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

public HAppExitException(int exitCode)
   :base ( new AppExitData(exitCode) ) {}

public HAppExitException(Exception innerException)
   :base ( innerException, new AppExitData() ) {}

public HAppExitException(Exception innerException,int exitCode)
   :base ( innerException, new AppExitData(exitCode) ) {}

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

public HAppExitException(object associatedData)
   :base ( (string)null, new AppExitData(associatedData) ) {}

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

public HAppExitException(string message,object associatedData)
   :base ( message, new AppExitData(associatedData) ) {}

public HAppExitException(string message,Exception innerException,object associatedData)
   :base ( message, innerException, new AppExitData(associatedData) ) {}

public HAppExitException(string message,int exitCode,object associatedData)
   :base ( message, new AppExitData(exitCode,associatedData) ) {}

public HAppExitException( string message, Exception innerException,
                           int? exitCode, object associatedData )
   :base ( message, innerException, new AppExitData(exitCode,associatedData) ) {}

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

public HAppExitException(int exitCode,object associatedData)
   :base ( new AppExitData(exitCode,associatedData) ) {}

public HAppExitException(Exception innerException,object associatedData)
   :base ( innerException, new AppExitData(associatedData) ) {}

public HAppExitException(Exception innerException,int exitCode,object associatedData)
   :base ( innerException, new AppExitData(exitCode,associatedData) ) {}

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

public int? ExitCode
{
   get { return ((AppExitData)base.AssociatedData).ExitCode; }
}

public new object AssociatedData
{
   get { return ((AppExitData)base.AssociatedData).AssociatedData; }
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HAppExitException
//**************************************************************************************************

} // CommonHelpers (.WASM)
