org.apache.hadoop.service
Class ServiceStateException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.hadoop.service.ServiceStateException
All Implemented Interfaces:
Serializable

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class ServiceStateException
extends RuntimeException

Exception that is raised on state change operations.

See Also:
Serialized Form

Constructor Summary
ServiceStateException(String message)
           
ServiceStateException(String message, Throwable cause)
           
ServiceStateException(Throwable cause)
           
 
Method Summary
static RuntimeException convert(String text, Throwable fault)
          Convert any exception into a RuntimeException.
static RuntimeException convert(Throwable fault)
          Convert any exception into a RuntimeException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceStateException

public ServiceStateException(String message)

ServiceStateException

public ServiceStateException(String message,
                             Throwable cause)

ServiceStateException

public ServiceStateException(Throwable cause)
Method Detail

convert

public static RuntimeException convert(Throwable fault)
Convert any exception into a RuntimeException. If the caught exception is already of that type, it is typecast to a RuntimeException and returned. All other exception types are wrapped in a new instance of ServiceStateException

Parameters:
fault - exception or throwable
Returns:
a ServiceStateException to rethrow

convert

public static RuntimeException convert(String text,
                                       Throwable fault)
Convert any exception into a RuntimeException. If the caught exception is already of that type, it is typecast to a RuntimeException and returned. All other exception types are wrapped in a new instance of ServiceStateException

Parameters:
text - text to use if a new exception is created
fault - exception or throwable
Returns:
a ServiceStateException to rethrow


Copyright © 2014 Apache Software Foundation. All Rights Reserved.