using System;
using System.Collections.Generic;
using System.Text;
using Interop.VixCOM;
namespace Vestris.VMWareLib
{
///
/// A VMWare exception. Every VMWare operational failure is translated into
/// a .
///
public class VMWareException : Exception
{
private ulong _errorCode = 0;
///
/// The original VMWare error code.
///
public ulong ErrorCode
{
get
{
return _errorCode;
}
}
///
/// A VMWare exception with default error text in English-US.
///
/// VMWare VixCOM.Constants error code.
public VMWareException(ulong code)
: this(code, new VixLib().GetErrorText(code, "en-US"))
{
}
///
/// A VMWare exception.
///
/// VMWare VixCOM.Constants error code.
/// Error description.
public VMWareException(ulong code, string message)
: base(message)
{
_errorCode = code;
}
}
}