Class ExceptionDescription

java.lang.Object
org.gvsig.utils.ExceptionDescription

public abstract class ExceptionDescription extends Object

Most exceptions produced in a layer, has common information (layer name, driver name, error description, error code).

An ExceptionDescription can provide this extra information describing the cause of the error, and more useful information to give to the user that works with a layer.

Author:
azabala
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sets the name of the layer (if a layer was using) with that this exception was produced.
    ExceptionDescription(int errorCode, String errorDescription)
    Creates a new ExceptionDescription with the useful values initialized.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the name of the driver (if a driver was using) which this exception was produced.
    int
    Gets the code which identifies the kind of error which is the cause of this exception.
    Gets the description about the error which produced this exception.
    abstract String
    Returns a message that describes the error which produced this exception, formatted in HTML code.
    Gets the name of the layer (if a layer was using) with that this exception was produced.
    void
    setCode(int errorCode)
    Sets the code which identifies the kind of error which is the cause of this exception.
    void
    setDescription(String description)
    Sets the description about the error which produced this exception.
    void
    setDriverName(String driverName)
    Sets the name of the driver (if a driver was using) which this exception was produced.
    void
    setLayerName(String layerName)
    Sets the name of the layer (if a layer was using) with that this exception was produced.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExceptionDescription

      public ExceptionDescription()

      Sets the name of the layer (if a layer was using) with that this exception was produced.

      Parameters:
      layerName - the name of the layer (if a layer was using) with that this exception was produced
    • ExceptionDescription

      public ExceptionDescription(int errorCode, String errorDescription)

      Creates a new ExceptionDescription with the useful values initialized.

      Parameters:
      errorCode - code which identifies the kind of error which is the cause of this exception
      errorDescription - description about the error which produced this exception
  • Method Details

    • getDriverName

      public String getDriverName()

      Gets the name of the driver (if a driver was using) which this exception was produced.

      Returns:
      the name of the driver (if a driver was using) which this exception was produced
    • setDriverName

      public void setDriverName(String driverName)

      Sets the name of the driver (if a driver was using) which this exception was produced.

      Parameters:
      driverName - the name of the driver (if a driver was using) which this exception was produced
    • getLayerName

      public String getLayerName()

      Gets the name of the layer (if a layer was using) with that this exception was produced.

      Returns:
      the name of the layer (if a layer was using) with that this exception was produced
    • setLayerName

      public void setLayerName(String layerName)

      Sets the name of the layer (if a layer was using) with that this exception was produced.

      Parameters:
      layerName - the name of the layer (if a layer was using) with that this exception was produced
    • setCode

      public void setCode(int errorCode)

      Sets the code which identifies the kind of error which is the cause of this exception.

      Parameters:
      errorCode - code which identifies the kind of error which is the cause of this exception
    • setDescription

      public void setDescription(String description)

      Sets the description about the error which produced this exception.

      Parameters:
      description - description about the error which produced this exception
    • getErrorCode

      public int getErrorCode()

      Gets the code which identifies the kind of error which is the cause of this exception.

      Returns:
      code which identifies the kind of error which is the cause of this exception
    • getErrorDescription

      public String getErrorDescription()

      Gets the description about the error which produced this exception.

      Returns:
      description about the error which produced this exception
    • getHtmlErrorMessage

      public abstract String getHtmlErrorMessage()

      Returns a message that describes the error which produced this exception, formatted in HTML code.

      Returns:
      message that describes the error which produced this exception, formatted in HTML code