    001    /*
    002     * Licensed to the Apache Software Foundation (ASF) under one or more
    003     * contributor license agreements.  See the NOTICE file distributed with
    004     * this work for additional information regarding copyright ownership.
    005     * The ASF licenses this file to You under the Apache License, Version 2.0
    006     * (the "License"); you may not use this file except in compliance with
    007     * the License.  You may obtain a copy of the License at
    008     *
    009     *      http://www.apache.org/licenses/LICENSE-2.0
    010     *
    011     * Unless required by applicable law or agreed to in writing, software
    012     * distributed under the License is distributed on an "AS IS" BASIS,
    013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014     * See the License for the specific language governing permissions and
    015     * limitations under the License.
    016     */
    017
    018    package org.apache.commons.math.linear;
    019
    020    import org.apache.commons.math.MathRuntimeException;
    021    import org.apache.commons.math.exception.util.DummyLocalizable;
    022    import org.apache.commons.math.exception.util.Localizable;
    023
    024    /**
    025     * Thrown when a system attempts an operation on a matrix, and
    026     * that matrix does not satisfy the preconditions for the
    027     * aforementioned operation.
    028     * @version $Revision: 1073253 $ $Date: 2011-02-22 09:40:05 +0100 (mar. 22 f??vr. 2011) $
    029     */
    030    public class InvalidMatrixException extends MathRuntimeException {
    031
    032        /** Serializable version identifier. */
    033        private static final long serialVersionUID = -2068020346562029801L;
    034
    035        /**
    036         * Construct an exception with the given message.
    037         * @param pattern format specifier
    038         * @param arguments format arguments
    039         * @since 2.0
    040         * @deprecated since 2.2 replaced by {@link #InvalidMatrixException(Localizable, Object...)}
    041         */
    042        @Deprecated
    043        public InvalidMatrixException(final String pattern, final Object ... arguments) {
    044            this(new DummyLocalizable(pattern), arguments);
    045        }
    046
    047        /**
    048         * Construct an exception with the given message.
    049         * @param pattern format specifier
    050         * @param arguments format arguments
    051         * @since 2.2
    052         */
    053        public InvalidMatrixException(final Localizable pattern, final Object ... arguments) {
    054            super(pattern, arguments);
    055        }
    056
    057        /**
    058         * Construct an exception with the given message.
    059         * @param cause the exception or error that caused this exception
    060         * to be thrown.
    061         * @since 2.0
    062         */
    063        public InvalidMatrixException(final Throwable cause) {
    064            super(cause);
    065        }
    066
    067    }