Class OpusException
- Namespace
- DSharpPlus.VoiceLink.Opus
- Assembly
- DSharpPlus.VoiceLink.dll
Thrown by any Opus method that could fail.
public sealed class OpusException : Exception, ISerializable
- Inheritance
-
OpusException
- Implements
- Inherited Members
Constructors
OpusException(OpusErrorCode)
public OpusException(OpusErrorCode errorCode)
Parameters
errorCode
OpusErrorCode
OpusException(OpusErrorCode, string)
public OpusException(OpusErrorCode errorCode, string message)
Parameters
errorCode
OpusErrorCodemessage
string
OpusException(OpusErrorCode, string, Exception)
public OpusException(OpusErrorCode errorCode, string message, Exception inner)
Parameters
errorCode
OpusErrorCodemessage
stringinner
Exception
Properties
ErrorCode
The error code that any Opus method could have failed with.
public OpusErrorCode ErrorCode { get; init; }
Property Value
Methods
GetErrorMessage(OpusErrorCode)
Matches an error code to a human-readable error message.
public static string GetErrorMessage(OpusErrorCode errorCode)
Parameters
errorCode
OpusErrorCodeThe error code to match.
Returns
- string
A human-readable error message.