org.codehaus.waffle.validation
Class AbstractErrorMessage

java.lang.Object
  extended by org.codehaus.waffle.validation.AbstractErrorMessage
All Implemented Interfaces:
ErrorMessage
Direct Known Subclasses:
FieldErrorMessage, GlobalErrorMessage

public abstract class AbstractErrorMessage
extends java.lang.Object
implements ErrorMessage

Abstract base class for all error messages. Handles the error cause and the retrieval of stack messages.

Author:
Mauro Talevi

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.codehaus.waffle.validation.ErrorMessage
ErrorMessage.Type
 
Field Summary
protected  java.lang.Throwable cause
           
 
Constructor Summary
protected AbstractErrorMessage(java.lang.Throwable cause)
           
 
Method Summary
 java.lang.Throwable getCause()
          Returns the throwable that caused the error
 java.util.List<java.lang.String> getStackMessages()
          Returns the list of messages for the exception stack that cause the error, ie the list of Throwable.getMessage() from the stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.waffle.validation.ErrorMessage
getMessage, getType
 

Field Detail

cause

protected java.lang.Throwable cause
Constructor Detail

AbstractErrorMessage

protected AbstractErrorMessage(java.lang.Throwable cause)
Method Detail

getStackMessages

public java.util.List<java.lang.String> getStackMessages()
Description copied from interface: ErrorMessage
Returns the list of messages for the exception stack that cause the error, ie the list of Throwable.getMessage() from the stack.

Specified by:
getStackMessages in interface ErrorMessage
Returns:
The List of stack messages

getCause

public java.lang.Throwable getCause()
Description copied from interface: ErrorMessage
Returns the throwable that caused the error

Specified by:
getCause in interface ErrorMessage
Returns:
The Throwable cause


Copyright © 2008. All Rights Reserved.