org.geomajas.gwt2.example.server.command.GetSimpleExceptionCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geomajas-client-gwt2-example-jar Show documentation
Show all versions of geomajas-client-gwt2-example-jar Show documentation
Geomajas GWT2 client: Main - Examples
/*
* This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
*
* Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium.
*
* The program is available in open source according to the GNU Affero
* General Public License. All contributions in this program are covered
* by the Geomajas Contributors License Agreement. For full licensing
* details, see LICENSE.txt in the project root.
*/
package org.geomajas.gwt2.example.server.command;
import org.geomajas.command.CommandHasRequest;
import org.geomajas.command.CommandResponse;
import org.geomajas.command.EmptyCommandRequest;
import org.springframework.stereotype.Component;
/**
*
* Command that generates an exception of class Exception, with message
* "Server-side generated exception.".
*
*
* @author Pieter De Graef / Jan Venstermans
*/
@Component
public class GetSimpleExceptionCommand implements
CommandHasRequest {
@Override
public void execute(EmptyCommandRequest request, CommandResponse response)
throws Exception {
throw new Exception("Server-side generated exception.");
}
@Override
public EmptyCommandRequest getEmptyCommandRequest() {
return new EmptyCommandRequest();
}
@Override
public CommandResponse getEmptyCommandResponse() {
return new CommandResponse();
}
}