1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package org.apache.commons.math.linear; 19 20 import org.apache.commons.math.MathRuntimeException; 21 import org.apache.commons.math.exception.util.DummyLocalizable; 22 import org.apache.commons.math.exception.util.Localizable; 23 24 /** 25 * Thrown when a system attempts an operation on a matrix, and 26 * that matrix does not satisfy the preconditions for the 27 * aforementioned operation. 28 * @version $Revision: 1073253 $ $Date: 2011-02-22 09:40:05 +0100 (mar. 22 fvr. 2011) $ 29 */ 30 public class InvalidMatrixException extends MathRuntimeException { 31 32 /** Serializable version identifier. */ 33 private static final long serialVersionUID = -2068020346562029801L; 34 35 /** 36 * Construct an exception with the given message. 37 * @param pattern format specifier 38 * @param arguments format arguments 39 * @since 2.0 40 * @deprecated since 2.2 replaced by {@link #InvalidMatrixException(Localizable, Object...)} 41 */ 42 @Deprecated 43 public InvalidMatrixException(final String pattern, final Object ... arguments) { 44 this(new DummyLocalizable(pattern), arguments); 45 } 46 47 /** 48 * Construct an exception with the given message. 49 * @param pattern format specifier 50 * @param arguments format arguments 51 * @since 2.2 52 */ 53 public InvalidMatrixException(final Localizable pattern, final Object ... arguments) { 54 super(pattern, arguments); 55 } 56 57 /** 58 * Construct an exception with the given message. 59 * @param cause the exception or error that caused this exception 60 * to be thrown. 61 * @since 2.0 62 */ 63 public InvalidMatrixException(final Throwable cause) { 64 super(cause); 65 } 66 67 } 68