
org.xins.logdoc.UnsupportedLocaleException Maven / Gradle / Ivy
/*
* $Id: UnsupportedLocaleException.java,v 1.16 2007/03/15 17:08:40 agoubard Exp $
*
* Copyright 2003-2007 Orange Nederland Breedband B.V.
* See the COPYRIGHT file for redistribution and use restrictions.
*/
package org.xins.logdoc;
/**
* Exception thrown if a specified locale is not supported by at least one
* logdoc Log
class.
*
* @version $Revision: 1.16 $ $Date: 2007/03/15 17:08:40 $
* @author Ernst de Haan
*
* @since XINS 1.0.0
*/
public final class UnsupportedLocaleException extends RuntimeException {
/**
* The locale that is unsupported. The value of this field cannot be
* null
.
*/
private final String _locale;
/**
* Constructs a new UnsupportedLocaleException
.
*
* @param locale
* the locale, cannot be null
.
*
* @throws IllegalArgumentException
* if locale == null
.
*/
public UnsupportedLocaleException(String locale)
throws IllegalArgumentException {
// Call superconstructor first
super("Locale \"" + locale + "\" is not supported.");
// Check preconditions
if (locale == null) {
throw new IllegalArgumentException("locale == null");
}
// Store locale?
_locale = locale;
}
/**
* Retrieves the unsupported locale.
*
* @return
* the unsupported locale, never null
.
*/
public String getLocale() {
return _locale;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy