public static void ThrowIfNotOk(FreeTypeError error) { if (error is not FreeTypeError.Ok) { throw new FreeTypeException(error); } }
/// <summary> /// Initializes a new instance of the <see cref="FreeTypeException" /> class. /// </summary> /// <param name="error">The error returned by FreeType.</param> public FreeTypeException(FreeTypeError error) : base("FreeType error: " + GetErrorMessage(error)) => Error = error;