public static void ThrowIfError(Error e, string message) { if (e != Error.Ok) { string s = string.Format("{0}. {0}", message, LibSpotify.sp_error_message(e)); throw new Spotify.Exception(e, s); } }