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 package org.apache.commons.discovery;
018
019 /**
020 * An exception that is thrown only if a suitable service
021 * instance cannot be created by {@code ServiceFactory}.
022 *
023 * @version $Revision: 1088947 $ $Date: 2011-04-05 11:51:19 +0200 (Tue, 05 Apr 2011) $
024 */
025 public class DiscoveryException extends RuntimeException {
026
027 /**
028 *
029 */
030 private static final long serialVersionUID = -2518293836976054070L;
031
032 /**
033 * Construct a new exception with <code>null</code> as its detail message.
034 */
035 public DiscoveryException() {
036 super();
037 }
038
039 /**
040 * Construct a new exception with the specified detail message.
041 *
042 * @param message The detail message
043 */
044 public DiscoveryException(String message) {
045 super(message);
046 }
047
048 /**
049 * Construct a new exception with the specified cause and a derived
050 * detail message.
051 *
052 * @param cause The underlying cause
053 */
054 public DiscoveryException(Throwable cause) {
055 super(cause);
056 }
057
058 /**
059 * Construct a new exception with the specified detail message and cause.
060 *
061 * @param message The detail message
062 * @param cause The underlying cause
063 */
064 public DiscoveryException(String message, Throwable cause) {
065 super(message, cause);
066 }
067
068 }