using RhythmBase.Events; namespace RhythmBase.Exceptions { /// /// Exception thrown when a beat is placed in an illegal position. /// public class IllegalBeatException(IBarBeginningEvent item) : RhythmBaseException { /// /// Gets the error message that explains the reason for the exception. /// public override string Message { get { return string.Format("This beat is invalid, the event {0} only allows the beat to be at the beginning of the bar.", ((BaseEvent)Item).Type); } } /// /// Gets the event that caused the exception. /// public IBarBeginningEvent Item = item; } }