
package uk.co.wingpath.io;

import java.io.IOException;
import uk.co.wingpath.util.*;

/**
* Sub-class of IOException used to report recoverable I/O exceptions.
*/
public class RecoverableIOException
    extends IOException
    implements Helpful
{
    private final String helpId;

    /**
    * Constructs a <code>RecoverableIOException</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 RecoverableIOException (String helpId, String message)
    {
        super (message);
        this.helpId = helpId;
    }

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

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

