Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* This file is part of the GeoLatte project.
*
* GeoLatte is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GeoLatte is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with GeoLatte. If not, see .
*
* Copyright (C) 2010 - 2010 and Ownership of code is shared by:
* Qmino bvba - Romeinsestraat 18 - 3001 Heverlee (http://www.qmino.com)
* Geovise bvba - Generaal Eisenhowerlei 9 - 2140 Antwerpen (http://www.geovise.com)
*/
package org.geolatte.common.transformer;
/**
* Exception thrown when an element could not be transformed by a Transformation.
*
*
*
* @author Bert Vanhooff
* @author Qmino bvba
* @since SDK1.5
*/
public class TransformationException extends Exception {
private Object failedObject;
/**
* Constructs a new exception with the object that caused failure of the transformation.
* This object can be retrieved through {@link #getFailedObject()}.
*
* Further documentation, see {@link Exception}
*
* @param failedObject The transformation input object that caused the transformation to fail. This object must be of the Source type of the Transformation. Unfortunately, we cannot enforce this through generics as Exceptions cannot be generic.
*/
public TransformationException(Object failedObject) {
this.failedObject = failedObject;
}
/**
* Constructs a new exception with the object that caused failure of the transformation.
* This object can be retrieved through {@link #getFailedObject()}.
*
* Futher documentation, see {@link Exception}
*
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
* @param failedObject The transformation input object that caused the transformation to fail. This object must be of the Source type of the Transformation. Unfortunately, we cannot enforce this through generics as Exceptions cannot be generic.
*/
public TransformationException(String message, Object failedObject) {
super(message);
this.failedObject = failedObject;
}
/**
* Constructs a new exception with the object that caused failure of the transformation.
* This object can be retrieved through {@link #getFailedObject()}.
*
* Futher documentation, see {@link Exception}
*
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @param failedObject The transformation input object that caused the transformation to fail. This object must be of the Source type of the Transformation. Unfortunately, we cannot enforce this through generics as Exceptions cannot be generic.
*/
public TransformationException(String message, Throwable cause, Object failedObject) {
super(message, cause);
this.failedObject = failedObject;
}
/**
* Constructs a new exception with the object that caused failure of the transformation.
* This object can be retrieved through {@link #getFailedObject()}.
*
* Futher documentation, see {@link Exception}
*
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @param failedObject The transformation input object that caused the transformation to fail. This object must be of the Source type of the Transformation. Unfortunately, we cannot enforce this through generics as Exceptions cannot be generic.
*/
public TransformationException(Throwable cause, Object failedObject) {
super(cause);
this.failedObject = failedObject;
}
/**
* The transformation input object that caused this exception. This the type of this object is the Source type of the transformation that threw this exception.
* @return The input object that failed to be transformed.
*/
public Object getFailedObject() {
return failedObject;
}
}