• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 package org.apache.commons.math;
18 
19 import java.io.Serializable;
20 
21 import org.apache.commons.math.exception.util.DummyLocalizable;
22 import org.apache.commons.math.exception.util.Localizable;
23 
24 /**
25  * Signals a configuration problem with any of the factory methods.
26  * @version $Revision: 983921 $ $Date: 2010-08-10 12:46:06 +0200 (mar. 10 août 2010) $
27  */
28 public class MathConfigurationException extends MathException implements Serializable{
29 
30     /** Serializable version identifier */
31     private static final long serialVersionUID = 5261476508226103366L;
32 
33     /**
34      * Default constructor.
35      */
MathConfigurationException()36     public MathConfigurationException() {
37         super();
38     }
39 
40     /**
41      * Constructs an exception with specified formatted detail message.
42      * Message formatting is delegated to {@link java.text.MessageFormat}.
43      * @param pattern format specifier
44      * @param arguments format arguments
45      * @since 1.2
46      */
MathConfigurationException(String pattern, Object ... arguments)47     public MathConfigurationException(String pattern, Object ... arguments) {
48         this(new DummyLocalizable(pattern), arguments);
49     }
50 
51     /**
52      * Constructs an exception with specified formatted detail message.
53      * Message formatting is delegated to {@link java.text.MessageFormat}.
54      * @param pattern format specifier
55      * @param arguments format arguments
56      * @since 2.2
57      */
MathConfigurationException(Localizable pattern, Object ... arguments)58     public MathConfigurationException(Localizable pattern, Object ... arguments) {
59         super(pattern, arguments);
60     }
61 
62     /**
63      * Create an exception with a given root cause.
64      * @param cause  the exception or error that caused this exception to be thrown
65      */
MathConfigurationException(Throwable cause)66     public MathConfigurationException(Throwable cause) {
67         super(cause);
68     }
69 
70     /**
71      * Constructs an exception with specified formatted detail message and root cause.
72      * Message formatting is delegated to {@link java.text.MessageFormat}.
73      * @param cause  the exception or error that caused this exception to be thrown
74      * @param pattern format specifier
75      * @param arguments format arguments
76      * @since 1.2
77      */
MathConfigurationException(Throwable cause, String pattern, Object ... arguments)78     public MathConfigurationException(Throwable cause, String pattern, Object ... arguments) {
79         this(cause, new DummyLocalizable(pattern), arguments);
80     }
81 
82     /**
83      * Constructs an exception with specified formatted detail message and root cause.
84      * Message formatting is delegated to {@link java.text.MessageFormat}.
85      * @param cause  the exception or error that caused this exception to be thrown
86      * @param pattern format specifier
87      * @param arguments format arguments
88      * @since 2.2
89      */
MathConfigurationException(Throwable cause, Localizable pattern, Object ... arguments)90     public MathConfigurationException(Throwable cause, Localizable pattern, Object ... arguments) {
91         super(cause, pattern, arguments);
92     }
93 
94 }
95