package com.capgemini.reports.exceptions;

/**
 * Exception Thrown if two schedulings with the same name exist.
 */
public class DuplicateSchedulingEntryFound extends InvalidInputException {

    private static final long serialVersionUID = -7724360531026615817L;

    private final String messageToUser;

    /**
     * Simple constructor.
     * 
     * @param messageToUser a message for the user
     */
    public DuplicateSchedulingEntryFound(final String messageToUser) {
        super(UserInputErrorEnum.DUPLICATE_REPORT_LAUNCHED_RECENTLY_BY_SELF);
        this.messageToUser = messageToUser;
    }

    /**
     * Returns the message to be sent to the user.
     * 
     * @return the message
     */
    @Override
    public String getErrorMessageForUser() {
        return messageToUser;
    }


}
