package CH.ifa.draw.util;

import java.io.IOException;

/**
 * IOException that describes an UnknownTypeException.
 * Used when the requested type was not found.
 * @deprecated This class is not to be used externally and will later be hidden.
 */
@Deprecated(since = "5.0", forRemoval = true)
public class UnknownTypeException extends IOException {
    /** The name of the requested type that could not be found */
    private final String _type;

    /**
     * Constructs an UnknownTypeException with a custom message.
     *
     * @param message message used for the exception
     * @param type the name of the requested type that could not be found
     */
    public UnknownTypeException(final String message, final String type) {
        super(message);
        this._type = type;
    }

    /**
     * Gets the name of the requested type that could not be found.
     *
     * @return the name of the requested type that could not be found
     */
    public String getType() {
        return this._type;
    }
}