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

net.anotheria.anosite.wizard.handler.response.WizardResponseAbort Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
package net.anotheria.anosite.wizard.handler.response;

import net.anotheria.anosite.shared.InternalResponseCode;

/**
 * WizardResponseAbort usually happens if some exception occurred during execution.
 *
 * @author h3ll
 */
public class WizardResponseAbort extends WizardHandlerResponse {

	/**
	 * Basic serial version UID.
	 */
	private static final long serialVersionUID = 1525345918533128347L;
	/**
	 * WizardResponseAbort 'cause'.
	 */
	private Exception cause;


	/**
	 * Public constructor.
	 *
	 * @param aException {@link Exception}
	 */
	public WizardResponseAbort(Exception aException) {
		cause = aException;
	}


	@Override
	public InternalResponseCode getResponseCode() {
		return InternalResponseCode.ABORT;
	}

	public Exception getCause() {
		return cause;
	}

	/**
	 * Return exception message if possible.
	 *
	 * @return String message or null
	 */
	public String getCauseMessage() {
		return cause != null ? cause.getMessage() : null;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy