示例#1
0
        /// <summary>
        /// Send the specified exception as an event to the active state listener. </summary>
        /// <param name="exception"> Exception to send </param>
        public virtual void dispatchException(FriendlyException exception)
        {
            TrackStateListener currentListener = activeListener;

            ExceptionTools.log(log, exception, track.Identifier);

            if (currentListener != null)
            {
                trackException = exception;
                currentListener.onTrackException(track, exception);
            }
        }
示例#2
0
        public void execute(TrackStateListener listener)
        {
            try
            {
                hasStarted     = true;
                activeListener = listener;
                remoteNodeManager.startPlaying(this);
            }
            catch (Exception throwable)
            {
                listener.onTrackException(track, ExceptionTools.wrapUnfriendlyExceptions("An error occurred when trying to start track remotely.", FriendlyException.Severity.FAULT, throwable));

                ExceptionTools.rethrowErrors(throwable);
            }
        }
示例#3
0
        /// <summary>
        /// Detach the currently active listener, so no useless reference would be kept and no events would be sent there.
        /// </summary>
        public virtual void detach()
        {
            activeListener = null;

            markerTracker.trigger(MarkerState.ENDED);
        }