001    package edu.upenn.cis.spinal;
002    
003    /**
004     * Exception thrown when a method is called on an object representing 
005     * a skipped sentence in the LTAG-spinal treebank.
006     *
007     * @author Lucas Champollion
008     */
009    public class SkippedSentenceException extends IllegalStateException {
010        
011        private Sentence source = null;
012        
013        /** Creates a new instance of <code>SkippedSentenceException</code>. */
014        public SkippedSentenceException() {
015        }
016        
017        /** 
018         * Creates a new instance of <code>SkippedSentenceException</code> and records the 
019         * sentence in question. 
020         * 
021         * @param source the sentence that caused this exception
022         */
023        public SkippedSentenceException(Sentence source) {
024            this.source = source;
025        }
026        
027        /**
028         * Returns the skipped sentence that caused this exception.
029         * 
030         * @return a <code>Sentence</code> object
031         */
032        public Sentence getSource() {
033            return this.source;
034        }
035    }