public class WuicException extends Exception
This exception is a global checked exception thrown by WUIC. This class also provides utility methods that throw an appropriate exception for each requirement.
Modifier and Type | Method and Description |
---|---|
static void |
throwBadArgumentException(Exception origin)
This method throws a global
IllegalArgumentException . |
static void |
throwBadStateException(Exception origin)
This method throws a global
IllegalStateException . |
static void |
throwBuilderPropertyNotSupportedException(String key,
Class<?> builderClass)
Throw an
IllegalArgumentException indicating a builder property is not supported. |
static void |
throwNutNotFoundException(String nutName,
String heapId)
Throws an
IOException indicating that a a nut for a particular heap has not been found. |
static void |
throwSaveUnsupportedMethodException(Class<?> clazz)
This method throws an
UnsupportedOperationException to indicate that
NutDao.save(com.github.wuic.nut.Nut) os not supported by a given class. |
static void |
throwStaticWorkflowNotFoundException(String fileName)
Throws an exception indicating that a static workflow file does not exists.
|
static void |
throwStreamException(IOException ioe)
Represents an exception which usually occurs when a IO issue is raised.
|
static void |
throwUnableToInstantiateException(Exception origin)
This method throws an
IllegalArgumentException when instantiation with reflection has failed. |
static void |
throwWorkflowNotFoundException(String workflowId)
Throws an exception indicating that a workflow does not exists.
|
static void |
throwWorkflowTemplateNotFoundException(String workflowId)
Throws an exception indicating that a workflow template does not exists.
|
static void |
throwWuicException(Exception origin)
Throws a new exception wrapping an origin.
|
static void |
throwWuicXmlReadException(Exception e)
Indicates that a wuic.xml file cannot be read
|
static void |
throwWuicXmlWorkflowIdentifierException(String idPrefix,
String id)
Indicates that a workflow does not reference one and only one of both 'idPrefix' and 'id' attributes.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static void throwWuicException(Exception origin) throws WuicException
Throws a new exception wrapping an origin.
origin
- the originWuicException
- the exceptionpublic static void throwBuilderPropertyNotSupportedException(String key, Class<?> builderClass)
Throw an IllegalArgumentException
indicating a builder property is not supported.
key
- the property keybuilderClass
- the built classpublic static void throwNutNotFoundException(String nutName, String heapId) throws IOException
Throws an IOException
indicating that a a nut for a particular heap has not been found.
nutName
- the nameheapId
- the heapIOException
- the exceptionpublic static void throwStreamException(IOException ioe) throws IOException
Represents an exception which usually occurs when a IO issue is raised. This method throws an exception wrapping an
IOException
.
ioe
- the originIOException
- the exceptionpublic static void throwSaveUnsupportedMethodException(Class<?> clazz)
This method throws an UnsupportedOperationException
to indicate that
NutDao.save(com.github.wuic.nut.Nut)
os not supported by a given class.
clazz
- the classpublic static void throwUnableToInstantiateException(Exception origin)
This method throws an IllegalArgumentException
when instantiation with reflection has failed.
origin
- the originpublic static void throwBadArgumentException(Exception origin)
This method throws a global IllegalArgumentException
.
origin
- the originpublic static void throwBadStateException(Exception origin)
This method throws a global IllegalStateException
.
origin
- original exceptionpublic static void throwWuicXmlWorkflowIdentifierException(String idPrefix, String id)
Indicates that a workflow does not reference one and only one of both 'idPrefix' and 'id' attributes.
id
- the IDidPrefix
- the ID prefixpublic static void throwWuicXmlReadException(Exception e)
Indicates that a wuic.xml file cannot be read
e
- the originpublic static void throwWorkflowNotFoundException(String workflowId) throws WorkflowNotFoundException
Throws an exception indicating that a workflow does not exists.
workflowId
- the workflow IDWorkflowNotFoundException
- the exceptionpublic static void throwWorkflowTemplateNotFoundException(String workflowId) throws WorkflowTemplateNotFoundException
Throws an exception indicating that a workflow template does not exists.
workflowId
- the workflow IDWorkflowTemplateNotFoundException
- the exceptionpublic static void throwStaticWorkflowNotFoundException(String fileName) throws StaticWorkflowNotFoundException
Throws an exception indicating that a static workflow file does not exists.
fileName
- the workflow file nameStaticWorkflowNotFoundException
- the exceptionCopyright © 2012-2015. All Rights Reserved.