|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.ceryle.wiki.plugin.query.QueryException
org.ceryle.wiki.plugin.assertion.AssertionException
public class AssertionException
A simple typed exception for use by the AssertionPlugin.
| Field Summary | |
|---|---|
static int |
MULTIPLE_UNDEFINED
An exception type constant indicating more than one undefined expression term. |
static int |
OBJECT_UNDEFINED
An exception type constant indicating an undefined expression object. |
static int |
PAGE_DOES_NOT_EXIST
An exception type constant indicating that the asserted 'about' page does not exist. |
static int |
PAGENAME_UNDEFINED
An exception type constant indicating an undefined page name. |
static int |
PREDICATE_UNDEFINED
An exception type constant indicating an undefined expression predicate. |
static int |
PROCESS_ERROR
An exception type constant indicating an error occurring during assertion processing. |
static int |
SUBJECT_UNDEFINED
An exception type constant indicating an undefined expression subject. |
static int |
TEMPLATE_ERROR
An exception type constant indicating an error due to template misconfiguration. |
static int |
TERM_UNDEFINED
An exception type constant indicating an undefined expression term (subject, predicate, and/or object). |
| Fields inherited from class org.ceryle.wiki.plugin.query.QueryException |
|---|
GRAMMAR_ERROR, m_type, PARAMETER_ERROR, QUERY_ERROR, SYNTAX_ERROR, UNKNOWN_ERROR |
| Constructor Summary | |
|---|---|
AssertionException(int type)
Constructor for an AssertionException with a type and no message. |
|
AssertionException(int type,
String message)
Constructor for an AssertionException with a type and message. |
|
AssertionException(String pagename,
int type)
Constructor for an AssertionException with an optional page name, a type, and no message. |
|
AssertionException(String pagename,
int type,
String message)
Constructor for an AssertionException with an optional page name, a type, and message. |
|
AssertionException(String pagename,
String subject,
String predicate,
String object,
String message)
Constructor for an AssertionException with a page name, subject, predicate, object, and message. |
|
| Method Summary | |
|---|---|
String |
getObject()
Returns the object of the assertion. |
String |
getPageName()
Returns the page name that is a possible cause (by its absence, incorrect type, etc.) of the exception. |
String |
getPredicate()
Returns the predicate of the assertion. |
String |
getSubject()
Returns the subject of the assertion. |
String |
getTypeDescription()
Return a textual description of the exception type, suitable as an exception "title". |
static String |
getTypeDescription(int type,
Throwable throwable)
Return a textual description of the exception type, suitable as an exception "title". |
protected void |
setType(int type)
Sets the type of this AssertionException. |
| Methods inherited from class org.ceryle.wiki.plugin.query.QueryException |
|---|
getType |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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 |
|---|
public static final int TERM_UNDEFINED
public static final int PAGENAME_UNDEFINED
public static final int SUBJECT_UNDEFINED
public static final int PREDICATE_UNDEFINED
public static final int OBJECT_UNDEFINED
public static final int MULTIPLE_UNDEFINED
public static final int PAGE_DOES_NOT_EXIST
public static final int TEMPLATE_ERROR
public static final int PROCESS_ERROR
| Constructor Detail |
|---|
public AssertionException(int type)
getTypeDescription(int,Throwable).
public AssertionException(String pagename,
int type)
getTypeDescription(int,Throwable).
public AssertionException(int type,
String message)
public AssertionException(String pagename,
int type,
String message)
public AssertionException(String pagename,
String subject,
String predicate,
String object,
String message)
MULTIPLE_UNDEFINED.
| Method Detail |
|---|
protected void setType(int type)
setType in class QueryExceptionpublic String getPageName()
getSubject().
If not set, returns null.
public String getSubject()
public String getPredicate()
public String getObject()
public String getTypeDescription()
getTypeDescription in class QueryExceptiongetTypeDescription(int,Throwable)
public static String getTypeDescription(int type,
Throwable throwable)
type - the type of the descriptionthrowable - an optional Throwable (e.g., Exception)TERM_UNDEFINED,
SUBJECT_UNDEFINED,
PAGENAME_UNDEFINED,
PREDICATE_UNDEFINED,
OBJECT_UNDEFINED,
MULTIPLE_UNDEFINED,
PAGE_DOES_NOT_EXIST,
PROCESS_ERROR,
QueryException.getTypeDescription(int,Throwable)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||