nl.knowledgeplaza.util
Class ExceptionUtil

java.lang.Object
  extended by nl.knowledgeplaza.util.ExceptionUtil

public class ExceptionUtil
extends Object

Version:
$Revision: 1.6 $

Constructor Summary
ExceptionUtil()
           
 
Method Summary
static String describe(Throwable t)
          Fetch all possible data from an exception (causes, extra info, next exceptions, ...) as a string
static String describeExtended(Throwable t)
          Fetch all possible data from an exception (causes, extra info, next exceptions, ...) as a string plus environment information like system properties.
static String determineDisplayableMessage(Throwable t)
          Create a displayable exception test
static Throwable findThrowableInChain(Throwable t, Class clazz)
           
static String getStacktrace(Throwable t)
          Return the stacktrace of a throwable as a string
static void main(String[] args)
           
static void throwUnchecked(Throwable t)
          Sneekly throws an checked exception (so there is no need to declare the throws)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionUtil

public ExceptionUtil()
Method Detail

getStacktrace

public static String getStacktrace(Throwable t)
Return the stacktrace of a throwable as a string

Parameters:
t - Throwable to be stacktraced
Returns:
stacktrace as String

determineDisplayableMessage

public static String determineDisplayableMessage(Throwable t)
Create a displayable exception test

Parameters:
t -
Returns:

describe

public static String describe(Throwable t)
Fetch all possible data from an exception (causes, extra info, next exceptions, ...) as a string

Parameters:
t -
Returns:

describeExtended

public static String describeExtended(Throwable t)
Fetch all possible data from an exception (causes, extra info, next exceptions, ...) as a string plus environment information like system properties.

Parameters:
t -
Returns:

findThrowableInChain

public static Throwable findThrowableInChain(Throwable t,
                                             Class clazz)
Parameters:
t -
clazz -
Returns:

throwUnchecked

public static void throwUnchecked(Throwable t)
Sneekly throws an checked exception (so there is no need to declare the throws)

Parameters:
exception -

main

public static void main(String[] args)


Copyright © 2011 KnowledgePlaza. All Rights Reserved.