01: /*
02: * Copyright 2003-2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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
27: Serializable {
28:
29: /** Serializable version identifier */
30: private static final long serialVersionUID = -3657394299929217890L;
31:
32: /**
33: * Default constructor.
34: */
35: public ConvergenceException() {
36: this (null, null);
37: }
38:
39: /**
40: * Construct an exception with the given message.
41: * @param message descriptive error message.
42: */
43: public ConvergenceException(String message) {
44: this (message, null);
45: }
46:
47: /**
48: * Construct an exception with the given message and root cause.
49: * @param message descriptive error message.
50: * @param cause root cause.
51: */
52: public ConvergenceException(String message, Throwable cause) {
53: super (message, cause);
54: }
55:
56: /**
57: * Create an exception with a given root cause.
58: * @param throwable caught exception causing this problem
59: */
60: public ConvergenceException(Throwable throwable) {
61: this(null, throwable);
62: }
63: }
|