All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.databasesandlife.util.gwtsafe.ConfigurationException Maven / Gradle / Ivy

There is a newer version: 21.0.1
Show newest version
package com.databasesandlife.util.gwtsafe;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Indicates that in some way a configuration file loaded by DomParser is incorrect.
 *
 * @author This source is copyright Adrian Smith and licensed under the LGPL 3.
 * @see Project on GitHub
 */
@SuppressWarnings("serial")
public class ConfigurationException extends Exception implements IsSerializable {

    public ConfigurationException() { }
    
    public ConfigurationException(String msg) {
        super(msg);
    }

    public ConfigurationException(String prefix, Throwable cause) {
        super(prefixExceptionMessage(prefix, cause), cause);
    }

    public ConfigurationException(Throwable cause) {
        this(null, cause);
    }
    
    public static String prefixExceptionMessage(String prefix, Throwable cause) {
        return (prefix == null ? "" : (prefix + ": ")) + ((cause.getMessage() == null) ? "Internal error" : cause.getMessage());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy