/// <summary> /// Initializes a new instance of the <see cref="InteropException"/> class. /// </summary> /// <param name="errorCode">The result code that caused this exception.</param> /// <param name="message">The message describing the exception.</param> public InteropException(Result errorCode, string message) : base(message) { Descriptor = ResultDescriptor.Find(errorCode); HResult = (int)errorCode; }
/// <summary> /// Initializes a new instance of the <see cref="InteropException"/> class. /// </summary> /// <param name="message">The message describing the exception.</param> /// <param name="innerException">The inner exception that caused this exception.</param> public InteropException(Result errorCode, Exception innerException) : base(null, innerException) { Descriptor = ResultDescriptor.Find(errorCode); HResult = (int)errorCode; }
/// <summary> /// Initializes a new instance of the <see cref="InteropException"/> class. /// </summary> /// <param name="errorCode">The result code that caused this exception.</param> public InteropException(Result errorCode) : this(ResultDescriptor.Find(errorCode)) { HResult = (int)errorCode; }