using System;
using System.Runtime.Serialization;
namespace System.Runtime.InteropServices
{
/// The exception that is thrown when an unrecognized HRESULT is returned from a COM method call.
// Token: 0x020002F5 RID: 757
[ComVisible(true)]
[Serializable]
public class COMException : ExternalException
{
/// Initializes a new instance of the class with default values.
// Token: 0x060021C2 RID: 8642 RVA: 0x00079014 File Offset: 0x00077214
public COMException()
{
}
/// Initializes a new instance of the class with a specified message.
/// The message that indicates the reason for the exception.
// Token: 0x060021C3 RID: 8643 RVA: 0x0007901C File Offset: 0x0007721C
public COMException(string message)
: base(message)
{
}
/// Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
/// The error message that explains the reason for the exception.
/// The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
// Token: 0x060021C4 RID: 8644 RVA: 0x00079028 File Offset: 0x00077228
public COMException(string message, Exception inner)
: base(message, inner)
{
}
/// Initializes a new instance of the class with a specified message and error code.
/// The message that indicates the reason the exception occurred.
/// The error code (HRESULT) value associated with this exception.
// Token: 0x060021C5 RID: 8645 RVA: 0x00079034 File Offset: 0x00077234
public COMException(string message, int errorCode)
: base(message, errorCode)
{
}
/// Initializes a new instance of the class from serialization data.
/// The object that holds the serialized object data.
/// The object that supplies the contextual information about the source or destination.
///
/// is null.
// Token: 0x060021C6 RID: 8646 RVA: 0x00079040 File Offset: 0x00077240
protected COMException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
/// Converts the contents of the exception to a string.
/// A string containing the , , , and properties of the exception.
///
///
///
// Token: 0x060021C7 RID: 8647 RVA: 0x0007904C File Offset: 0x0007724C
public override string ToString()
{
return string.Format("{0} (0x{1:x}): {2} {3}{4}{5}", new object[]
{
this.GetType(),
base.HResult,
this.Message,
(this.InnerException != null) ? this.InnerException.ToString() : string.Empty,
Environment.NewLine,
(this.StackTrace == null) ? string.Empty : this.StackTrace
});
}
}
}