Class HandlerErrorEventArgs
Raised when a handler of any other event of the connection threw an exception, playback or not.
public sealed class HandlerErrorEventArgs : EventArgs
- Inheritance
-
HandlerErrorEventArgs
- Inherited Members
Constructors
HandlerErrorEventArgs(Exception, EventArgs?)
Initializes the event args with the reported values.
public HandlerErrorEventArgs(Exception exception, EventArgs? origin = null)
Parameters
exceptionExceptionThe exception a handler threw.
originEventArgsThe args of the event whose handler threw, null only when the args were built manually without one.
Properties
Exception
The exception a handler of the connection threw.
public Exception Exception { get; }
Property Value
Remarks
This is a local failure of this client's own handler, not the server's error, the error the server reported for a track arrives as Exception instead, a handler that threw is always this client's own bug. An OperationCanceledException a handler throws is swallowed as cooperative cancellation and never arrives here.
Origin
The args of the event whose handler threw, the origin of the failure, match it to tell a lyrics, mix or lifecycle handler apart without parsing a stack trace.
public EventArgs? Origin { get; }
Property Value
Remarks
Null only when the args were built manually without one, the library's raises always supply it.