nl.toolforge.karma.core.cmd
Class CommandException

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

public class CommandException
extends java.lang.Exception

Exceptions thrown during the execution of a command.

Version:
$Id:
Author:
D.A. Smedes
See Also:
Serialized Form

Field Summary
static ErrorCode BUILD_FAILED
          The build of a module failed.
static ErrorCode BUILD_FAILED_TOO_MANY_MISSING_DEPENDENCIES
          The build of a module failed.
static ErrorCode BUILD_WARNING
           
static ErrorCode CANNOT_INITIALIZE_WORKING_CONTEXT
          The working context could not be initialized.
static ErrorCode CLEAN_ALL_FAILED
          The test of a module failed.
static ErrorCode CLEAN_MODULE_FAILED
          The test of a module failed.
static ErrorCode DEPENDENCY_DOES_NOT_EXIST
          The dependency that is referenced does not exists.
static ErrorCode DEPENDENCY_FILE_INVALID
           
static java.lang.String EXCEPTION_PREFIX
           
static ErrorCode INVALID_ARGUMENT
          Argument for a command option is invalid.
static ErrorCode INVALID_COMMAND
          The command is invalid.
static ErrorCode INVALID_LOCATION_TYPE
          The location type is invalid.
static ErrorCode INVALID_OPTION
          Invalid option.
static ErrorCode INVALID_STATE_MODULE_NOT_WORKING
          Thrown when a module is not working and the user wants to stop work on it.
static ErrorCode INVALID_WORKING_CONTEXT_CONFIGURATION
          Configuration for working context is invalid.
static ErrorCode MISSING_ARGUMENT
          Argument for a command option is missing.
static ErrorCode MISSING_OPTION
          A required option (see <required>-attributes for options in commands.xml.
static ErrorCode MODULE_CANNOT_BE_WORKING_FOR_RELEASE_MANIFEST
          A module is encountered with state WORKING.
static ErrorCode MODULE_NOT_LOCAL
           
static ErrorCode MODULE_TYPE_MUST_BE_BASEMODULE
          When the module is not (a descendant of) BaseModule.
static ErrorCode MODULE_VERSION_ERROR
           
static ErrorCode NO_BUILD_DIR
          build (the default directory where built files are located) is missing.
static ErrorCode NO_IMPLEMENTING_CLASS
           
static ErrorCode NO_MODULE_BUILD_DIR
          build/<module> (the default directory for a module where built files are located) is missing.
static ErrorCode NO_OPTIONS_REQUIRED
          No arguments required.
static ErrorCode NO_SRC_DIR
          src/java (the default directory for a module where java sources are located) is missing.
static ErrorCode NO_TEST_DIR
          test/java (the default directory for a module where test java sources are located) is missing.
static ErrorCode PACKAGE_FAILED
          The packaging of a module failed.
static ErrorCode PACKAGE_FAILED_INVALID_APPLICATION_XML
          The packaging of a module failed.
static ErrorCode PACKAGE_FAILED_NO_APPLICATION_XML
          The packaging of a module failed.
static ErrorCode PACKAGE_FAILED_NOTHING_TO_PACKAGE
          The packaging of a module failed.
static ErrorCode PACKAGE_FAILED_WRONG_MODULE_TYPE
          The packaging of a module failed.
static ErrorCode PROMOTE_ONLY_ALLOWED_ON_WORKING_MODULE
          Promote command is not allowed on static and dynamic modules.
static ErrorCode PROMOTE_WITH_INCREASE_MAJOR_VERSION_NOT_ALLOWED_ON_RELEASE_MANIFEST
          Promote command is not allowed on static and dynamic modules.
static ErrorCode START_WORK_NOT_ALLOWED_ON_STATIC_MODULE
          When the manifest is a development manifest and the module is STATIC.
static ErrorCode TEST_CODE
          Not to be used for business logic.
static ErrorCode TEST_FAILED
          The test of a module failed.
static ErrorCode TEST_REPORT_FAILED
          Generating the test report failed.
static ErrorCode TEST_WARNING
           
static ErrorCode UNCOMMITTED_CHANGED_FILES
           
static ErrorCode UNCOMMITTED_NEW_FILES
           
static ErrorCode UNCOMMITTED_REMOVED_FILES
           
static ErrorCode UNKNOWN_COMMAND
           
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
CommandException(ErrorCode errorCode)
           
CommandException(ErrorCode errorCode, java.lang.Object[] messageArguments)
           
CommandException(java.lang.Throwable t, ErrorCode errorCode)
           
CommandException(java.lang.Throwable t, ErrorCode errorCode, java.lang.Object[] messageArguments)
           
 
Method Summary
 ErrorCode getErrorCode()
          Gets the exceptions' ErrorCode.
 java.lang.String getMessage()
           
 java.lang.Object[] getMessageArguments()
           
 
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
See Also:
Constant Field Values

TEST_CODE

public static final ErrorCode TEST_CODE
Not to be used for business logic. Needed for testing.


NO_IMPLEMENTING_CLASS

public static final ErrorCode NO_IMPLEMENTING_CLASS

UNKNOWN_COMMAND

public static final ErrorCode UNKNOWN_COMMAND

INVALID_COMMAND

public static final ErrorCode INVALID_COMMAND
The command is invalid. The command could not be created.


MISSING_OPTION

public static ErrorCode MISSING_OPTION
A required option (see <required>-attributes for options in commands.xml.


MISSING_ARGUMENT

public static ErrorCode MISSING_ARGUMENT
Argument for a command option is missing.


INVALID_ARGUMENT

public static ErrorCode INVALID_ARGUMENT
Argument for a command option is invalid.


INVALID_OPTION

public static final ErrorCode INVALID_OPTION
Invalid option.


NO_OPTIONS_REQUIRED

public static final ErrorCode NO_OPTIONS_REQUIRED
No arguments required. More of a warning really.


BUILD_FAILED

public static final ErrorCode BUILD_FAILED
The build of a module failed.


BUILD_FAILED_TOO_MANY_MISSING_DEPENDENCIES

public static final ErrorCode BUILD_FAILED_TOO_MANY_MISSING_DEPENDENCIES
The build of a module failed.


TEST_FAILED

public static final ErrorCode TEST_FAILED
The test of a module failed.


TEST_REPORT_FAILED

public static final ErrorCode TEST_REPORT_FAILED
Generating the test report failed.


CLEAN_MODULE_FAILED

public static final ErrorCode CLEAN_MODULE_FAILED
The test of a module failed.


CLEAN_ALL_FAILED

public static final ErrorCode CLEAN_ALL_FAILED
The test of a module failed.


PACKAGE_FAILED

public static final ErrorCode PACKAGE_FAILED
The packaging of a module failed.


PACKAGE_FAILED_NOTHING_TO_PACKAGE

public static final ErrorCode PACKAGE_FAILED_NOTHING_TO_PACKAGE
The packaging of a module failed.


PACKAGE_FAILED_NO_APPLICATION_XML

public static final ErrorCode PACKAGE_FAILED_NO_APPLICATION_XML
The packaging of a module failed.


PACKAGE_FAILED_INVALID_APPLICATION_XML

public static final ErrorCode PACKAGE_FAILED_INVALID_APPLICATION_XML
The packaging of a module failed.


PACKAGE_FAILED_WRONG_MODULE_TYPE

public static final ErrorCode PACKAGE_FAILED_WRONG_MODULE_TYPE
The packaging of a module failed.


START_WORK_NOT_ALLOWED_ON_STATIC_MODULE

public static final ErrorCode START_WORK_NOT_ALLOWED_ON_STATIC_MODULE
When the manifest is a development manifest and the module is STATIC. Not allowed to start work on this module.


MODULE_TYPE_MUST_BE_BASEMODULE

public static final ErrorCode MODULE_TYPE_MUST_BE_BASEMODULE
When the module is not (a descendant of) BaseModule. Not allowed to start work on this module.


PROMOTE_ONLY_ALLOWED_ON_WORKING_MODULE

public static final ErrorCode PROMOTE_ONLY_ALLOWED_ON_WORKING_MODULE
Promote command is not allowed on static and dynamic modules.


PROMOTE_WITH_INCREASE_MAJOR_VERSION_NOT_ALLOWED_ON_RELEASE_MANIFEST

public static final ErrorCode PROMOTE_WITH_INCREASE_MAJOR_VERSION_NOT_ALLOWED_ON_RELEASE_MANIFEST
Promote command is not allowed on static and dynamic modules.


DEPENDENCY_DOES_NOT_EXIST

public static final ErrorCode DEPENDENCY_DOES_NOT_EXIST

The dependency that is referenced does not exists. This could happen when:


DEPENDENCY_FILE_INVALID

public static final ErrorCode DEPENDENCY_FILE_INVALID

NO_SRC_DIR

public static final ErrorCode NO_SRC_DIR
src/java (the default directory for a module where java sources are located) is missing.


NO_TEST_DIR

public static final ErrorCode NO_TEST_DIR
test/java (the default directory for a module where test java sources are located) is missing.


UNCOMMITTED_NEW_FILES

public static final ErrorCode UNCOMMITTED_NEW_FILES

UNCOMMITTED_CHANGED_FILES

public static final ErrorCode UNCOMMITTED_CHANGED_FILES

UNCOMMITTED_REMOVED_FILES

public static final ErrorCode UNCOMMITTED_REMOVED_FILES

NO_MODULE_BUILD_DIR

public static final ErrorCode NO_MODULE_BUILD_DIR
build/<module> (the default directory for a module where built files are located) is missing.


NO_BUILD_DIR

public static final ErrorCode NO_BUILD_DIR
build (the default directory where built files are located) is missing.


MODULE_VERSION_ERROR

public static final ErrorCode MODULE_VERSION_ERROR

TEST_WARNING

public static final ErrorCode TEST_WARNING

BUILD_WARNING

public static final ErrorCode BUILD_WARNING

INVALID_STATE_MODULE_NOT_WORKING

public static final ErrorCode INVALID_STATE_MODULE_NOT_WORKING
Thrown when a module is not working and the user wants to stop work on it.


MODULE_NOT_LOCAL

public static final ErrorCode MODULE_NOT_LOCAL

INVALID_LOCATION_TYPE

public static final ErrorCode INVALID_LOCATION_TYPE
The location type is invalid. Happens when another type of location is required than is specified.


CANNOT_INITIALIZE_WORKING_CONTEXT

public static final ErrorCode CANNOT_INITIALIZE_WORKING_CONTEXT
The working context could not be initialized.


MODULE_CANNOT_BE_WORKING_FOR_RELEASE_MANIFEST

public static final ErrorCode MODULE_CANNOT_BE_WORKING_FOR_RELEASE_MANIFEST
A module is encountered with state WORKING. This is not allowed when creating a release manifest.


INVALID_WORKING_CONTEXT_CONFIGURATION

public static final ErrorCode INVALID_WORKING_CONTEXT_CONFIGURATION
Configuration for working context is invalid.

Constructor Detail

CommandException

public CommandException(ErrorCode errorCode)

CommandException

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

CommandException

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

CommandException

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

getMessage

public java.lang.String getMessage()

getErrorCode

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

Returns:

getMessageArguments

public final java.lang.Object[] getMessageArguments()


Copyright © 2002-2004 Toolforge. All Rights Reserved.