|
Oracle Fusion Middleware Java API Reference for Oracle Mobile Application Framework 2.0.0.0.0 E36392-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectThrowable
Exception
RuntimeException
oracle.adfmf.framework.exception.AdfException
public class AdfException
Exception class used by ADFMF to generate and use exceptions in the framework. It implements JSONSerializable as we want only selected bits to be serialized and thus this class implements toJSON() which handles serialization of this class.
Field Summary | |
---|---|
static String |
ERROR
AdfException severity constant for ERROR logging |
static String |
FATAL
AdfException severity constant for FATAL logging |
static String |
INFO
AdfException severity constant for INFO logging |
static String |
WARNING
AdfException severity constant for WARNING logging |
Constructor Summary | |
---|---|
AdfException()
Default no argument AdfException constructor |
|
AdfException(String message,
String severity)
AdfException constructor |
|
AdfException(String severity,
String bundleName,
String key,
Object[] params)
AdfException constructor |
|
AdfException(Throwable t)
AdfException constructor |
|
AdfException(Throwable t,
String severity)
AdfException constructor |
Method Summary | |
---|---|
String |
getMessage()
Get error message from the exception object |
String |
getSeverity()
Get severity of the exception |
String |
getType()
Get type of exception |
boolean |
isException()
Check if its an exception |
void |
setException(boolean exception)
Set exception flag |
void |
setMessage(String message)
Set the error message to the exception object |
void |
setSeverity(String sev)
Set severity of the exception |
void |
setType(String type)
Set type of exception |
Object |
toJSON()
toJSON implementation as AdfException class implements JSONSerializable |
String |
toString()
Method to convert AdfException object to String. |
Methods inherited from class Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String INFO
public static final String WARNING
public static final String ERROR
public static final String FATAL
Constructor Detail |
---|
public AdfException()
public AdfException(String severity, String bundleName, String key, Object[] params)
severity
- Severity of the exception (Use AdfException Severity constants -
INFO, WARNING, ERROR)bundleName
- Name of the bundle where the message key belongskey
- Message key in the bundleparams
- Additional parameters to be used in constructing the error messagepublic AdfException(String message, String severity)
message
- Error Message stringseverity
- Severity of the exception (Use AdfException Severity constants -
INFO, WARNING, ERROR)public AdfException(Throwable t)
t
- Throwable object to be used to generate AdfException objectpublic AdfException(Throwable t, String severity)
t
- Throwable to be used to generate AdfException objectseverity
- Severity of the exception (Use AdfException Severity constants -
INFO, WARNING, ERROR)Method Detail |
---|
public String getMessage()
getMessage
in class Throwable
public void setMessage(String message)
message
- Error message as a Stringpublic String getSeverity()
public void setSeverity(String sev)
sev
- Severity of the exception (INFO, WARNING, ERROR, FATAL)public String getType()
public void setType(String type)
type
- Type of exception (Exception class name -
exceptionClassName.class.getName())public boolean isException()
public void setException(boolean exception)
exception
- boolean flag set to indicate if it's an exception or not.public String toString()
toString
in class Throwable
public Object toJSON() throws Exception
toJSON
in interface JSONSerializable
Exception
|
Oracle Fusion Middleware Java API Reference for Oracle Mobile Application Framework 2.0.0.0.0 E36392-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |