Chirp.Radio.Agent.AudioPlayer.OnError C# (CSharp) Method

OnError() protected method

this is no good! i think the json api stuff has to move in here so that it runs in the background. the front-end should be bound to the current track Called whenever there is an error with playback, such as an AudioTrack not downloading correctly
This method is not guaranteed to be called in all cases. For example, if the background agent itself has an unhandled exception, it won't get called back to handle its own errors.
protected OnError ( BackgroundAudioPlayer player, AudioTrack track, Exception error, bool isFatal ) : void
player BackgroundAudioPlayer The BackgroundAudioPlayer
track AudioTrack The track that had the error
error System.Exception The error that occured
isFatal bool If true, playback cannot continue and playback of the track will stop
return void
        protected override void OnError(BackgroundAudioPlayer player, AudioTrack track, Exception error, bool isFatal)
        {
            if (isFatal)
            {
                Abort();
            }
            else
            {
                NotifyComplete();
            }
        }