Skip to content
Snippets Groups Projects
MissingContentException.java 498 B
Newer Older
package mi.hdm.exceptions;

import java.lang.reflect.Type;

/**
 * This exception is thrown when no object is found for a code.
 */
public class MissingContentException extends Exception {
    private final String code;

    public MissingContentException(String code, Type type) {
        super("Missing content exception: no instance of '" + type.getTypeName() + "' was found with code '" + code + "'");
        this.code = code;
    }

    public String getCode() {
        return code;
    }
}