001    package sysModel.fish;
002    
003    /**
004     * Exception during fish simulation.
005     */
006    public class FishException extends RuntimeException {
007         /**
008         * The exception that was thrown.
009         */
010        private Throwable _target;
011    
012        /**
013         * Constructs a FishException with a target exception.
014         *
015         * @param target the _target exception
016         */
017        public FishException(Throwable target) {
018            _target = target;
019        }
020    
021        /**
022         * Get the thrown target exception.
023         *
024         * @return the thrown _target exception (cause of this exception).
025         */
026        public Throwable getTargetException() {
027            return _target;
028        }
029    
030        /**
031         * Returns the cause of this exception (the thrown target exception).
032         *
033         * @return  the cause of this exception.
034         */
035        public Throwable getCause() {
036            return _target;
037        }
038    }