org.codehaus.mojo.xmlbeans
Class XmlBeansException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.maven.plugin.AbstractMojoExecutionException
              extended by org.apache.maven.plugin.MojoExecutionException
                  extended by org.codehaus.mojo.exception.CodedException
                      extended by org.codehaus.mojo.xmlbeans.XmlBeansException
All Implemented Interfaces:
Serializable

public class XmlBeansException
extends CodedException

An error occurring within the XmlBeans plugin. Look, hardcoding strings, bad idea, correct? This subclass of CodedException has all varieties of this exception indicated by a static Error object. To throw an exception, pass the specific Error constant as the first parameter in it's constructor. All of the error messages themselves may be found in XmlBeansException.properties

Version:
$Id: XmlBeansException.java 6588 2008-03-28 12:22:57Z bentmann $
Author:
Kris Bravo
See Also:
Serialized Form

Field Summary
static Error ARTIFACT_FILE_PATH
           
static Error CLASSPATH_DEPENDENCY
          Something went wrong while looking up the classpath.
static Error COMPILE_ERRORS
          Errors occurred during the compile phase of the plugins process.
static Error COPY_CLASSES
           
static Error INVALID_ARTIFACT_REFERENCE
           
static Error INVALID_CONFIG_FILE
           
static Error MISSING_FILE
           
static Error MISSING_SCHEMA_DIRECTORY
          We need the schema directory to continue.
static Error MISSING_SCHEMA_FILE
           
static Error REQ_FILE_MISSING
          The publisher specified in the configuration isn't valid.
static Error STALE_FILE_TOUCH
           
static Error UNSET_PROPERTIES
          setProject was never called on XmlBeansPlugin so the PluginProperties was never set.
static Error XSD_ARTIFACT_JAR
           
 
Fields inherited from class org.codehaus.mojo.exception.CodedException
error, errorFields, errors, MISSING_ERROR_KEY
 
Fields inherited from class org.apache.maven.plugin.AbstractMojoExecutionException
longMessage, source
 
Constructor Summary
XmlBeansException(Error code)
          A part specific exception with a specific error code.
XmlBeansException(Error code, String field)
          A part specific exception with an error code and fields in the message.
XmlBeansException(Error code, String[] fields)
          A part specific exception with an error code and fields in the message.
XmlBeansException(Error code, String[] fields, Throwable exception)
          Creates a coded exception with fields and a root cause.
XmlBeansException(Error code, String field, Throwable exception)
          Creates a coded exception with fields and a root cause.
XmlBeansException(Error code, Throwable exception)
          Creates a new Coded CAM Exception, given an error code and root cause.
 
Method Summary
 
Methods inherited from class org.codehaus.mojo.exception.CodedException
getMessage, init
 
Methods inherited from class org.apache.maven.plugin.AbstractMojoExecutionException
getLongMessage, getSource
 
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

REQ_FILE_MISSING

public static final Error REQ_FILE_MISSING
The publisher specified in the configuration isn't valid.


UNSET_PROPERTIES

public static final Error UNSET_PROPERTIES
setProject was never called on XmlBeansPlugin so the PluginProperties was never set.


MISSING_SCHEMA_DIRECTORY

public static final Error MISSING_SCHEMA_DIRECTORY
We need the schema directory to continue.


COMPILE_ERRORS

public static final Error COMPILE_ERRORS
Errors occurred during the compile phase of the plugins process.


CLASSPATH_DEPENDENCY

public static final Error CLASSPATH_DEPENDENCY
Something went wrong while looking up the classpath.


MISSING_FILE

public static final Error MISSING_FILE

INVALID_CONFIG_FILE

public static final Error INVALID_CONFIG_FILE

XSD_ARTIFACT_JAR

public static final Error XSD_ARTIFACT_JAR

ARTIFACT_FILE_PATH

public static final Error ARTIFACT_FILE_PATH

INVALID_ARTIFACT_REFERENCE

public static final Error INVALID_ARTIFACT_REFERENCE

STALE_FILE_TOUCH

public static final Error STALE_FILE_TOUCH

MISSING_SCHEMA_FILE

public static final Error MISSING_SCHEMA_FILE

COPY_CLASSES

public static final Error COPY_CLASSES
Constructor Detail

XmlBeansException

public XmlBeansException(Error code)
A part specific exception with a specific error code.

Parameters:
code -

XmlBeansException

public XmlBeansException(Error code,
                         String[] fields)
A part specific exception with an error code and fields in the message.

Parameters:
code -
fields -

XmlBeansException

public XmlBeansException(Error code,
                         String field)
A part specific exception with an error code and fields in the message.

Parameters:
code -
field -

XmlBeansException

public XmlBeansException(Error code,
                         Throwable exception)
Creates a new Coded CAM Exception, given an error code and root cause.

Parameters:
code - The Error of this particular exception.
exception - The root cause of the problem.

XmlBeansException

public XmlBeansException(Error code,
                         String field,
                         Throwable exception)
Creates a coded exception with fields and a root cause.

Parameters:
code - The code key used to look up the error text.
field - A single value with which to replace the error message field.
exception - The source of the error.

XmlBeansException

public XmlBeansException(Error code,
                         String[] fields,
                         Throwable exception)
Creates a coded exception with fields and a root cause.

Parameters:
code - The code key used to look up the error text.
fields - An array of field values to replace fields in the error message.
exception - The source of the error.


Copyright © 2005-2011 Codehaus. All Rights Reserved.