/* ======================================================================
   Parts Copyright 2006 University of Leeds, Oxford University, University of the Highlands and Islands.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

====================================================================== */

package org.bodington.server.userimport;


/** An exception giving the cause why selecting the users failed.
<p>
<br/>$HeadURL: https://svn.oucs.ox.ac.uk/sysdev/src/u/usrgrpgen/tags/2.0-3/uk/ac/ox/usrgrpgen/GroupCreationException.java $
<br/>$LastChangedRevision: 3381 $
<br/>$LastChangedDate: 2004-04-02 16:43:20 +0100 (Fri, 02 Apr 2004) $
<br/>$LastChangedBy: mats $
</p>
@author	Mats Henrikson
@version $LastChangedRevision: 3381 $
*/
public class GroupCreationException extends Exception {


	/** Common error message. */
	private String message = "A group creation error has occurred.";
	/** If there is a nested Throwable it will be in here. */
	private Throwable cause;


	/** Initialise the exception. */
	public GroupCreationException() {
		fillInStackTrace();
	}


	/** Initialise the exception.
	@param	cause	Takes another Throwable and nests it.
	*/
	public GroupCreationException(Throwable cause) {
		super(cause);
		fillInStackTrace();
	}


	/** Initialise the exception.
	@param	extraInfo	Any extra info can be appended to the general error
			message.
	*/
	public GroupCreationException(String extraInfo) {
		if(extraInfo != null) { message = message+" "+extraInfo; }
		fillInStackTrace();
	}


	/** Initialise the exception.
	@param	extraInfo	Any extra info can be appended to the general error
			message.
	*/
	public GroupCreationException(String extraInfo, Throwable cause) {
		super(cause);
		if(extraInfo != null) { message = message+" "+extraInfo; }
		fillInStackTrace();
	}


	/** Return the message of this exception.
	@return	The detailed error message of this exception.
	*/
	public String getMessage() { return message; }
}
