public class AdfException extends RuntimeException implements JSONSerializable
| Modifier and Type | Field and Description | 
|---|---|
| static String | ERRORAdfException severity constant for ERROR logging | 
| static String | FATALAdfException severity constant for FATAL logging | 
| static String | INFOAdfException severity constant for INFO logging | 
| static String | WARNINGAdfException severity constant for WARNING logging | 
| Constructor and Description | 
|---|
| 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 | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
public static final String INFO
public static final String WARNING
public static final String ERROR
public static final String FATAL
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)public String getMessage()
getMessage in class Throwablepublic 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 Throwablepublic Object toJSON()
              throws Exception
toJSON in interface JSONSerializableException