org.kuali.rice.ken.exception
Class ErrorList

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.kuali.rice.ken.exception.ErrorList
All Implemented Interfaces:
Serializable

public class ErrorList
extends Exception

This class is a valud added datastructure that is used to house a list of Exceptions and is recognized as an Exception so that it can be thrown from methods and handled like an Exception.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Constructor Summary
ErrorList()
          Constructs a ErrorList instance.
 
Method Summary
 void addError(String error)
          This method adds errors to the error list.
 void addErrors(ErrorList errors)
          This method adds a list of errors to the error list.
 List getErrors()
          This method retreives all of the errors in the list.
 String getMessage()
          This method returns a string representation of all of the errors in the error list.
 boolean isEmpty()
          This method checks to see if the list is empty or not.
 String toString()
          This method is responsible for concatenating all of the errors in the error list together.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorList

public ErrorList()
Constructs a ErrorList instance.

Method Detail

isEmpty

public boolean isEmpty()
This method checks to see if the list is empty or not.

Returns:
boolean

addError

public void addError(String error)
This method adds errors to the error list.

Parameters:
error -

getErrors

public List getErrors()
This method retreives all of the errors in the list.

Returns:
List

addErrors

public void addErrors(ErrorList errors)
This method adds a list of errors to the error list.

Parameters:
errors -

getMessage

public String getMessage()
This method returns a string representation of all of the errors in the error list.

Overrides:
getMessage in class Throwable
See Also:
Throwable.getMessage()

toString

public String toString()
This method is responsible for concatenating all of the errors in the error list together.

Overrides:
toString in class Throwable
See Also:
Throwable.toString()


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.