net.sf.blunder
Class Blunder

java.lang.Object
  extended by net.sf.blunder.Blunder

public class Blunder
extends Object

Blunder is an automated tool for analyzing chained exceptions in Java.

Author:
Ambrosi Lucas

Constructor Summary
Blunder()
          Default constructor.
 
Method Summary
 Throwable getBusinessException()
           
 BusinessExceptionDetector getBusinessExceptionDetector()
           
 String getErrorDescription()
           
 ExceptionRelation getExceptionRelation()
           
 String getFaultCode()
           
 String getFaultString()
           
 Throwable getLeafException()
           
 String[] getPossibleSolutions()
           
 String getPossibleSolutionsAsHtmlList()
           
 String getPossibleSolutionsAsString()
           
 RelationResolver getRelationResolver()
           
 Throwable getRootException()
           
 boolean isBusinessError()
           
 boolean isBusinessException(Throwable t)
           
 boolean isClientError()
           
 boolean isErrorKindOf(String kindOf)
           
 boolean isServerError()
           
 boolean isUndefinedError()
           
 boolean isUserError()
           
 Blunder process(Throwable t)
          Process a Throwable with Blunder.
 void setBusinessExceptionDetector(BusinessExceptionDetector businessExceptionDetector)
           
 void setRelationResolver(RelationResolver relationResolver)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Blunder

public Blunder()
Default constructor.

Method Detail

process

public Blunder process(Throwable t)
Process a Throwable with Blunder.

Parameters:
t - Chained Exception to analyze.

isBusinessException

public boolean isBusinessException(Throwable t)
Parameters:
t - the Throwable code to analyze.
Returns:
true if the Throwable object is considered from business classes. false otherwise.

getLeafException

public Throwable getLeafException()
Returns:
The highest level Exception in the chain.

getBusinessException

public Throwable getBusinessException()
Returns:
The business Exception in the chain. WARN:Could be null.

getRootException

public Throwable getRootException()
Returns:
The lowest level Exception in the chain.

getExceptionRelation

public ExceptionRelation getExceptionRelation()
Returns:
The ExceptionRelation object.

getBusinessExceptionDetector

public BusinessExceptionDetector getBusinessExceptionDetector()

setBusinessExceptionDetector

public void setBusinessExceptionDetector(BusinessExceptionDetector businessExceptionDetector)

getRelationResolver

public RelationResolver getRelationResolver()

setRelationResolver

public void setRelationResolver(RelationResolver relationResolver)

toString

public String toString()
Overrides:
toString in class Object
Returns:
the String representation of this chained Exception analysis.

getPossibleSolutions

public String[] getPossibleSolutions()
Returns:
An array of String´s with the list of possible solutions on this chained Exception.
See Also:
ExceptionRelation.getPossibleSolutionsList()

getPossibleSolutionsAsString

public String getPossibleSolutionsAsString()
Returns:
A String with the list of possible solutions on this chained Exception. Separated with a '\n' character.
See Also:
ExceptionRelation.getPossibleSolutionsList()

getPossibleSolutionsAsHtmlList

public String getPossibleSolutionsAsHtmlList()
Returns:
A String with the list of possible solutions on this chained Exception. Represented as an HTML list.
See Also:
ExceptionRelation.getPossibleSolutionsList()

getFaultString

public String getFaultString()
Returns:
The processed error message.
See Also:
ExceptionRelation.getFaultString()

getFaultCode

public String getFaultCode()
Returns:
The fault code String.
See Also:
ExceptionRelation.getFaultCode()

isErrorKindOf

public boolean isErrorKindOf(String kindOf)

isServerError

public boolean isServerError()

isBusinessError

public boolean isBusinessError()

isClientError

public boolean isClientError()

isUserError

public boolean isUserError()

isUndefinedError

public boolean isUndefinedError()

getErrorDescription

public String getErrorDescription()


Copyright © 2009 Blunder. All Rights Reserved.