nl.toolforge.karma.core.location
Class LocationException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bynl.toolforge.karma.core.location.LocationException
All Implemented Interfaces:
java.io.Serializable

public final class LocationException
extends java.lang.Exception

Exceptions relating to Locations. As with all other KarmaExceptions, exceptions can only be thrown with a certain ErrorCode.

Version:
$Id: LocationException.java,v 1.23 2004/11/02 23:57:06 asmedes Exp $
Author:
D.A. Smedes
See Also:
Serialized Form

Field Summary
static ErrorCode CONNECTION_EXCEPTION
          A connection to the location could not be made.
static ErrorCode DUPLICATE_LOCATION_KEY
           
static java.lang.String EXCEPTION_PREFIX
          This is the prefix that is shown when displaying the error.
static ErrorCode INVALID_ELEMENT_VALUE
           
static ErrorCode INVALID_LOCATION_STORE_LOCATION
          The location-store is configured based on properties in karma.properties.
static ErrorCode INVALID_LOCATION_TYPE
          The location was configured incorrectly.
static ErrorCode INVALID_MANIFEST_STORE_LOCATION
          The manifest-store is configured based on properties in karma.properties.
static ErrorCode LOCATION_LOAD_ERROR
          An xml file with locations could not be loaded.
static ErrorCode LOCATION_MISMATCH
          A LOCATION_MISMATCH occurs when a module is locally available and an update is requested from another location.
static ErrorCode LOCATION_NOT_FOUND
          Location descriptor does not exist.
static ErrorCode MISSING_LOCATION_PROPERTY
          Missing location property
static ErrorCode NO_LOCATION_DATA_FOUND
          No location files were found.
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
LocationException(ErrorCode errorCode)
           
LocationException(ErrorCode errorCode, java.lang.Object[] messageArguments)
           
LocationException(java.lang.Throwable t, ErrorCode errorCode)
           
LocationException(java.lang.Throwable t, ErrorCode errorCode, java.lang.Object[] messageArguments)
           
 
Method Summary
 ErrorCode getErrorCode()
          Gets the exceptions' ErrorCode.
 java.lang.String getMessage()
          Helper method to get the localized error message based on the ErrorCode.
 java.lang.Object[] getMessageArguments()
          Retrieves the message arguments for this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXCEPTION_PREFIX

public static final java.lang.String EXCEPTION_PREFIX
This is the prefix that is shown when displaying the error.

See Also:
Constant Field Values

LOCATION_NOT_FOUND

public static final ErrorCode LOCATION_NOT_FOUND
Location descriptor does not exist. This happens when a module's 'location'-attribute cannot be found by the LocationFactory, which contains references to all Location objects mapped in locations.xml.


NO_LOCATION_DATA_FOUND

public static final ErrorCode NO_LOCATION_DATA_FOUND
No location files were found. Karma filters all *.xml-files from nl.toolforge.karma.core.boot.WorkingContext#getLocationStore().


MISSING_LOCATION_PROPERTY

public static final ErrorCode MISSING_LOCATION_PROPERTY
Missing location property


INVALID_MANIFEST_STORE_LOCATION

public static final ErrorCode INVALID_MANIFEST_STORE_LOCATION
The manifest-store is configured based on properties in karma.properties. This error code is created when the Location for the manifest-store could not be created succesfully.


INVALID_LOCATION_STORE_LOCATION

public static final ErrorCode INVALID_LOCATION_STORE_LOCATION
The location-store is configured based on properties in karma.properties. This error code is created when the Location for the location-store could not be created succesfully.


DUPLICATE_LOCATION_KEY

public static final ErrorCode DUPLICATE_LOCATION_KEY

LOCATION_LOAD_ERROR

public static final ErrorCode LOCATION_LOAD_ERROR
An xml file with locations could not be loaded.


LOCATION_MISMATCH

public static final ErrorCode LOCATION_MISMATCH
A LOCATION_MISMATCH occurs when a module is locally available and an update is requested from another location. A version control system generally gives an error for this.


CONNECTION_EXCEPTION

public static final ErrorCode CONNECTION_EXCEPTION
A connection to the location could not be made.


INVALID_LOCATION_TYPE

public static final ErrorCode INVALID_LOCATION_TYPE
The location was configured incorrectly.


INVALID_ELEMENT_VALUE

public static final ErrorCode INVALID_ELEMENT_VALUE
Constructor Detail

LocationException

public LocationException(ErrorCode errorCode)

LocationException

public LocationException(java.lang.Throwable t,
                         ErrorCode errorCode)

LocationException

public LocationException(ErrorCode errorCode,
                         java.lang.Object[] messageArguments)

LocationException

public LocationException(java.lang.Throwable t,
                         ErrorCode errorCode,
                         java.lang.Object[] messageArguments)
Method Detail

getMessage

public java.lang.String getMessage()
Helper method to get the localized error message based on the ErrorCode.


getErrorCode

public final ErrorCode getErrorCode()
Gets the exceptions' ErrorCode.


getMessageArguments

public final java.lang.Object[] getMessageArguments()
Retrieves the message arguments for this exception.



Copyright © 2002-2004 Toolforge. All Rights Reserved.