001 /*
002 * Copyright 2002-2004 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005 * use this file except in compliance with the License. You may obtain a copy of
006 * the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013 * License for the specific language governing permissions and limitations under
014 * the License.
015 */
016 package org.springframework.richclient.application;
017
018 /**
019 * Indicates that an application-level programming error or a runtime
020 * configuration error has occurred.
021 *
022 * <p>
023 * This exception should not be thrown for errors such as invalid user
024 * input or data access errors. Basically, this represents a defect in the
025 * program or its runtime configuration. This is a very general top-level
026 * exception. Before creating and throwing a new instance of this type,
027 * consider if a more specific subclass would be more appropriate.
028 * </p>
029 *
030 */
031 public class ApplicationException extends RuntimeException {
032
033 private static final long serialVersionUID = 1732836822446152658L;
034
035 /**
036 * Creates a new {@code ApplicationException}.
037 */
038 public ApplicationException() {
039 super();
040 }
041
042 /**
043 * Creates a new {@code ApplicationException} with the specified message.
044 *
045 * @param message The detail message.
046 */
047 public ApplicationException(String message) {
048 super(message);
049 }
050
051 /**
052 * Creates a new {@code ApplicationException} with the specified message
053 * and nested exception.
054 *
055 * @param message The detail message.
056 * @param cause The nested exception.
057 */
058 public ApplicationException(String message, Throwable cause) {
059 super(message, cause);
060 }
061
062 /**
063 * Creates a new {@code ApplicationException} with the specified nested exception.
064 *
065 * @param cause The nested exception.
066 */
067 public ApplicationException(Throwable cause) {
068 super(cause);
069 }
070
071 }