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.ode;
019
020 import org.apache.commons.math.MathException;
021 import org.apache.commons.math.exception.util.DummyLocalizable;
022 import org.apache.commons.math.exception.util.Localizable;
023
024 /**
025 * This exception is made available to users to report
026 * the error conditions that are triggered while computing
027 * the differential equations.
028 * @version $Revision: 1072413 $ $Date: 2011-02-19 19:59:39 +0100 (sam. 19 f??vr. 2011) $
029 * @since 1.2
030 */
031 public class DerivativeException extends MathException {
032
033 /** Serializable version identifier */
034 private static final long serialVersionUID = 5666710788967425123L;
035
036 /** Simple constructor.
037 * Build an exception by translating and formating a message
038 * @param specifier format specifier (to be translated)
039 * @param parts to insert in the format (no translation)
040 */
041 public DerivativeException(final String specifier, final Object ... parts) {
042 this(new DummyLocalizable(specifier), parts);
043 }
044
045 /** Simple constructor.
046 * Build an exception by translating and formating a message
047 * @param specifier format specifier (to be translated)
048 * @param parts to insert in the format (no translation)
049 * @since 2.2
050 */
051 public DerivativeException(final Localizable specifier, final Object ... parts) {
052 super(specifier, parts);
053 }
054
055 /** Build an instance from an underlying cause.
056 * @param cause cause for the exception
057 */
058 public DerivativeException(final Throwable cause) {
059 super(cause);
060 }
061
062 }