/** * Send the specified exception as an event to the active state listener. * @param exception Exception to send */ public void dispatchException(FriendlyException exception) { TrackStateListener currentListener = activeListener; ExceptionTools.log(log, exception, track.getIdentifier()); if (currentListener != null) { trackException = exception; currentListener.onTrackException(track, exception); } }
private void notifyTrackStuck() { if (player instanceof TrackStateListener) { ((TrackStateListener) player).onTrackStuck(player.getPlayingTrack(), timeout); } } }
@Override public void execute(TrackStateListener listener) { try { hasStarted = true; activeListener = listener; remoteNodeManager.startPlaying(this); } catch (Throwable throwable) { listener.onTrackException(track, ExceptionTools.wrapUnfriendlyExceptions( "An error occurred when trying to start track remotely.", FriendlyException.Severity.FAULT, throwable)); ExceptionTools.rethrowErrors(throwable); } }
listener.onTrackException(audioTrack, exception);