org.apache.hadoop.service
Class ServiceStateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
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
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
ServiceStateException
public ServiceStateException(String message)
ServiceStateException
public ServiceStateException(String message,
Throwable cause)
ServiceStateException
public ServiceStateException(Throwable cause)
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 createdfault
- exception or throwable
- Returns:
- a ServiceStateException to rethrow
Copyright © 2014 Apache Software Foundation. All Rights Reserved.