/* this belongs to the WebRaveler package */ package webraveler.ravel; import java.util.*; import webraveler.http.HTTPResponse; /** * An error for Web Raveler * * @author The Web Raveler Development Squad * @version 1.0 */ public class RavelerError { /* variables */ String errorString; Hashtable stdErrors; HTTPResponse response; /* constructors */ /** * Constructs a RavelerError with an error number associated with a standard set of errors * * @param errorNumber an integer containing the error number */ public RavelerError(int errorNumber) { initializeStdErrors(); errorString = (String) stdErrors.get(new Integer(errorNumber)); } public RavelerError(HTTPResponse response) { this.response = response; } /** * Constructs a RavelerError an error number associated with a standard set of errors * and with a message describing the error * * @param errorNumber an integer containing the error number * @param errorString a string containing the message to display with the error */ public RavelerError(int errorNumber, String errorString){ } /** * Constructs a RavelerWarning with a message describing the warning * * @param warningString a string containing the message to display with the warning */ public RavelerError(String errorString){ this.errorString = errorString; } /* methods */ /** * Puts the standard warnings in a hashtable */ private void initializeStdErrors() { stdErrors = new Hashtable(); stdErrors.put(new Integer(100),"A problem occured while raveling the page."); } //initializeStdWarnings() /** * Gets the message associated with the error * * @return a string containing the message associated with the error */ public String getErrorString() { return errorString; } }