Class SoundFileException
Exception thrown when a libsndfile call fails.
public class SoundFileException : Exception, ISerializable
- Inheritance
-
SoundFileException
- Implements
- Inherited Members
Constructors
SoundFileException(int, string, string)
Creates a new SoundFileException from a message and error code, prefixed with the name of the failing call.
public SoundFileException(int errorCode, string function, string message)
Parameters
errorCodeintThe libsndfile error number, or 0 when not available.
functionstringThe libsndfile function that failed.
messagestringThe libsndfile error string.
SoundFileException(string, int)
Creates a new SoundFileException with a message and the libsndfile error code that produced it.
public SoundFileException(string message, int errorCode)
Parameters
messagestringThe libsndfile error string.
errorCodeintThe libsndfile error number, or 0 when not available.
SoundFileException(string, int, Exception)
Creates a new SoundFileException wrapping an underlying failure (e.g. a backing-stream I/O exception that could not propagate through the native callback boundary).
public SoundFileException(string message, int errorCode, Exception innerException)
Parameters
messagestringDescription of the failure.
errorCodeintThe libsndfile error number, or 0.
innerExceptionExceptionThe original exception.
Properties
ErrorCode
The raw libsndfile error number (sf_error), or 0 when not
available (for example when sf_open returned NULL).
public int ErrorCode { get; }
Property Value
Function
The libsndfile function that failed, or null when not supplied.
public string Function { get; }