
package uk.co.wingpath.util;

/**
* This exception is thrown when a value (usually user-entered) is unacceptable.
*/
public class ValueException
    extends Exception
    implements Helpful
{
    private final String helpId;

    /**
    * Constructs a <code>ValueException</code> with the specified message.
    * @param message the message to be passed in the exception.
    */
    public ValueException (String message)
    {
        super (message);
        helpId = null;
    }

    /**
    * Constructs a <code>ValueException</code> with the specified message
    * and help identifier.
    * @param message the message to be passed in the exception.
    * @param helpId the help identifier to be passed in the exception.
    */
    public ValueException (String helpId, String message)
    {
        super (message);
        this.helpId = helpId;
    }

    /**
    * Gets the help identifier.
    * @return the help identifier.
    */
    public String getHelpId ()
    {
        return helpId;
    }
}

