/*
* Created on Mar 18, 2005
*/
package com.sun.portal.wireless.htmlconversion;
/**
* Standard exception class for this package.
*
* @author ashwin.mathew@sun.com
*/
public class HtmlConversionException
extends Exception
{
/**
* An error occurred while invoking XML APIs.
*/
public static final int XML_ERROR = 1;
/**
* An error occurred while transforming HTML to AML.
*/
public static final int TRANSFORMATION_ERROR = 2;
/**
* The URL to scrape is malformed.
*/
public static final int MALFORMED_URL_ERROR = 3;
/**
* An error occurred while retrieving the URL to scrape.
*/
public static final int URL_RETRIEVAL_ERROR = 4;
/**
* The content type is unsupported for HTML conversion.
*/
public static final int UNSUPPORTED_CONTENT_TYPE = 5;
private int errorCode;
public HtmlConversionException(int errorCode, String message)
{
super(message);
this.errorCode = errorCode;
}
public HtmlConversionException(int errorCode, Throwable rootCause)
{
super(rootCause);
this.errorCode = errorCode;
}
public int getErrorCode()
{
return errorCode;
}
}
|