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

com.dragome.forms.bindings.client.command.ExceptionHandler Maven / Gradle / Ivy

There is a newer version: 0.96-beta4
Show newest version
package com.dragome.forms.bindings.client.command;

/**
 * This class is used by {@link com.pietschy.gwt.pectin.client.command.ExceptionManager} to handle
 * various exceptions as they occur.
 */
public abstract class ExceptionHandler
{
	private AsyncCommandCallback callback;

	public abstract void handle(T error);

	@SuppressWarnings("unchecked")
	void process(Throwable error, AsyncCommandCallback callback)
	{
		this.callback= callback;
		handle((T) error);
	}

	public void publishError(E error)
	{
		getCallback().publishError(error);
	}

	public void abort()
	{
		getCallback().abort();
	}

	public AsyncCommandCallback getCallback()
	{
		return callback;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy