org.apache.empire.exceptions
Class EmpireException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.empire.exceptions.EmpireException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BeanIncompatibleException, BeanInstantiationException, BeanPropertyGetException, BeanPropertySetException, DatabaseNotOpenException, EmpireFileException, EmpireSQLException, FieldValueException, InternalException, InvalidArgumentException, InvalidKeyException, InvalidPropertyException, ItemExistsException, ItemNotFoundException, MiscellaneousErrorException, NoPrimaryKeyException, NotImplementedException, NotSupportedException, ObjectNotValidException, PropertyReadOnlyException, QueryNoResultException, RecordDeleteFailedException, RecordNotFoundException, RecordUpdateFailedException, RecordUpdateInvalidException, UnexpectedReturnValueException

public class EmpireException
extends RuntimeException

This exception type is used for all empire errors.

See Also:
Serialized Form

Constructor Summary
protected EmpireException(ErrorType errType, String[] params)
          Constructor for derived classes
protected EmpireException(ErrorType errType, String[] params, Throwable cause)
          Constructor for derived classes
 
Method Summary
static String formatErrorMessage(ErrorType errType, String pattern, String[] params)
           
 String[] getErrorParams()
          The message parameters for the message.
 ErrorType getErrorType()
          The type of error that occurred
protected  void log()
          log the error (info must be enabled)
 
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
 

Constructor Detail

EmpireException

protected EmpireException(ErrorType errType,
                          String[] params,
                          Throwable cause)
Constructor for derived classes

Parameters:
errType -
params -
cause -

EmpireException

protected EmpireException(ErrorType errType,
                          String[] params)
Constructor for derived classes

Parameters:
errType -
params -
Method Detail

formatErrorMessage

public static String formatErrorMessage(ErrorType errType,
                                        String pattern,
                                        String[] params)

log

protected void log()
log the error (info must be enabled)


getErrorType

public ErrorType getErrorType()
The type of error that occurred

Returns:
the type of error
See Also:
ErrorType

getErrorParams

public String[] getErrorParams()
The message parameters for the message.

Returns:
the parameter array


Copyright © 2008–2014 Apache Software Foundation. All rights reserved.