org.overlord.sramp.ui.server.util
Class ExceptionUtils

java.lang.Object
  extended by org.overlord.sramp.ui.server.util.ExceptionUtils

public class ExceptionUtils
extends Object

Provides some util methods for dealing with exceptions.

Author:
eric.wittmann@redhat.com

Constructor Summary
ExceptionUtils()
           
 
Method Summary
static RemoteServiceException createRemoteException(org.overlord.sramp.client.SrampServerException serverError)
          Creates a remote exception that can be thrown to the client.
static RemoteServiceException createRemoteException(String message, Throwable root)
          Creates a remote exception that can be thrown to the client.
static RemoteServiceException createRemoteException(Throwable root)
          Creates a remote exception that can be thrown to the client.
static Throwable getRootCause(Throwable t)
          Gets the root exception from the given Throwable.
static String getRootStackTrace(Throwable t)
          Gets the root stack trace as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionUtils

public ExceptionUtils()
Method Detail

getRootStackTrace

public static String getRootStackTrace(Throwable t)
Gets the root stack trace as a string.

Parameters:
t -

getRootCause

public static Throwable getRootCause(Throwable t)
Gets the root exception from the given Throwable.

Parameters:
t -

createRemoteException

public static RemoteServiceException createRemoteException(String message,
                                                           Throwable root)
Creates a remote exception that can be thrown to the client.

Parameters:
message -
root -

createRemoteException

public static RemoteServiceException createRemoteException(Throwable root)
Creates a remote exception that can be thrown to the client.

Parameters:
root -

createRemoteException

public static RemoteServiceException createRemoteException(org.overlord.sramp.client.SrampServerException serverError)
Creates a remote exception that can be thrown to the client.

Parameters:
serverError -


Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.