Class MidiDeviceException
The exception that is thrown when an error occurred on a MIDI device.
Implements
Inherited Members
Namespace: Melanchall.DryWetMidi.Multimedia
Assembly: Melanchall.DryWetMidi.dll
Syntax
[Serializable]
public sealed class MidiDeviceException : MidiException, ISerializable
Constructors
MidiDeviceException()
Initializes a new instance of the MidiDeviceException.
Declaration
public MidiDeviceException()
MidiDeviceException(string)
Initializes a new instance of the MidiDeviceException with the
specified error message.
Declaration
public MidiDeviceException(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | The error message that explains the reason for the exception. |
MidiDeviceException(string, Exception)
Initializes a new instance of the MidiDeviceException class with the
specified error message and a reference to the inner exception that is the
cause of this exception.
Declaration
public MidiDeviceException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
string | message | The error message that explains the reason for the exception. |
Exception | innerException | The exception that is the cause of the current exception,
or a null reference if no inner exception is specified. |
MidiDeviceException(string, int)
Initializes a new instance of the MidiDeviceException class with the
specified error message and an error code.
Declaration
public MidiDeviceException(string message, int errorCode)
Parameters
Type | Name | Description |
---|---|---|
string | message | The error message that explains the reason for the exception. |
int | errorCode | The error code. |
Properties
ErrorCode
Gets the code of an error represented by the current MidiDeviceException.
Declaration
public int? ErrorCode { get; }
Property Value
Type | Description |
---|---|
int? |
Methods
GetObjectData(SerializationInfo, StreamingContext)
Sets the SerializationInfo with information about the exception.
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown. |
StreamingContext | context | The StreamingContext that contains contextual information about the source or destination. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException | info is null . |