1 /*
2 * Copyright 2003-2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.apache.commons.math;
17
18 import java.io.Serializable;
19
20 /**
21 * Error thrown when a numerical computation can not be performed because the
22 * numerical result failed to converge to a finite value.
23 *
24 * @version $Revision: 348519 $ $Date: 2005-11-23 12:12:18 -0700 (Wed, 23 Nov 2005) $
25 */
26 public class ConvergenceException extends MathException implements Serializable{
27
28 /** Serializable version identifier */
29 private static final long serialVersionUID = -3657394299929217890L;
30
31 /**
32 * Default constructor.
33 */
34 public ConvergenceException() {
35 this(null, null);
36 }
37
38 /**
39 * Construct an exception with the given message.
40 * @param message descriptive error message.
41 */
42 public ConvergenceException(String message) {
43 this(message, null);
44 }
45
46 /**
47 * Construct an exception with the given message and root cause.
48 * @param message descriptive error message.
49 * @param cause root cause.
50 */
51 public ConvergenceException(String message, Throwable cause) {
52 super(message, cause);
53 }
54
55 /**
56 * Create an exception with a given root cause.
57 * @param throwable caught exception causing this problem
58 */
59 public ConvergenceException(Throwable throwable) {
60 this(null, throwable);
61 }
62 }