1 /* 2 * @(#)ServiceConfigurationError.java 1.5 06/04/10 3 * 4 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package java.util; 9 10 11 /** 12 * Error thrown when something goes wrong while loading a service provider. 13 * 14 * <p> This error will be thrown in the following situations: 15 * 16 * <ul> 17 * 18 * <li> The format of a provider-configuration file violates the <a 19 * HREF="ServiceLoader.html#format">specification</a>; </li> 20 * 21 * <li> An {@link java.io.IOException IOException} occurs while reading a 22 * provider-configuration file; </li> 23 * 24 * <li> A concrete provider class named in a provider-configuration file 25 * cannot be found; </li> 26 * 27 * <li> A concrete provider class is not a subclass of the service class; 28 * </li> 29 * 30 * <li> A concrete provider class cannot be instantiated; or 31 * 32 * <li> Some other kind of error occurs. </li> 33 * 34 * </ul> 35 * 36 * 37 * @author Mark Reinhold 38 * @version 1.5, 06/04/10 39 * @since 1.6 40 */ 41 42 public class ServiceConfigurationError 43 extends Error 44 { 45 46 private static final long serialVersionUID = 74132770414881L; 47 48 /** 49 * Constructs a new instance with the specified message. 50 * 51 * @param msg The message, or <tt>null</tt> if there is no message 52 * 53 */ 54 public ServiceConfigurationError(String msg) { 55 super(msg); 56 } 57 58 /** 59 * Constructs a new instance with the specified message and cause. 60 * 61 * @param msg The message, or <tt>null</tt> if there is no message 62 * 63 * @param cause The cause, or <tt>null</tt> if the cause is nonexistent 64 * or unknown 65 */ 66 public ServiceConfigurationError(String msg, Throwable cause) { 67 super(msg, cause); 68 } 69 70 } 71