/*
 * ConversionException.java
 *
 * Created on December 6, 2004, 1:05 PM
 */

package org.geotools.data;

/**
 *
 * @author kjn
 */
public class ConversionException extends java.lang.Exception {

    /**
     * Holds value of property data.
     */
    private Object data;
    
    /**
     * Creates a new instance of <code>ConversionException</code> without detail message.
     */
    public ConversionException() {
    }
    
    
    /**
     * Constructs an instance of <code>ConversionException</code> with the specified detail message.
     * @param msg the detail message.
     */
    public ConversionException(String msg) {
        super(msg);
    }
    
    
    /**
     * Constructs an instance of <code>ConversionException</code> with the specified detail message.
     * @param msg the detail message.
     */
    public ConversionException(String msg, Throwable cause) {
        super(msg, cause);
    }

    
    /**
     * Creates a new instance of <code>ConversionException</code> without detail message.
     */
    public ConversionException(Object data) {
        this.data = data;
    }    
    
    /**
     * Constructs an instance of <code>ConversionException</code> with the specified detail message.
     * @param msg the detail message.
     */
    public ConversionException(String msg, Object data) {
        super(msg);
        this.data = data;
    }
    
    
    /**
     * Constructs an instance of <code>ConversionException</code> with the specified detail message.
     * @param msg the detail message.
     */
    public ConversionException(String msg, Throwable cause, Object data) {
        super(msg, cause);
        this.data = data;
    }

    /**
     * Returns the object for which conversion failed.
     * @return Value of property data.
     */
    public Object getData() {

        return this.data;
    }
}

