Hystrix: Latency and Fault Tolerance for Distributed Systems



com.netflix.hystrix.exception
Class HystrixRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.netflix.hystrix.exception.HystrixRuntimeException
All Implemented Interfaces:
java.io.Serializable

public class HystrixRuntimeException
extends java.lang.RuntimeException

RuntimeException that is thrown when a HystrixCommand fails and does not have a fallback.

See Also:
Serialized Form

Nested Class Summary
static class HystrixRuntimeException.FailureType
           
 
Constructor Summary
HystrixRuntimeException(HystrixRuntimeException.FailureType failureCause, java.lang.Class<? extends HystrixCommand> commandClass, java.lang.String message, java.lang.Exception cause, java.lang.Throwable fallbackException)
           
HystrixRuntimeException(HystrixRuntimeException.FailureType failureCause, java.lang.Class<? extends HystrixCommand> commandClass, java.lang.String message, java.lang.Throwable cause, java.lang.Throwable fallbackException)
           
 
Method Summary
 HystrixRuntimeException.FailureType getFailureType()
          The type of failure that caused this exception to be thrown.
 java.lang.Throwable getFallbackException()
          The Throwable that was thrown when trying to retrieve a fallback.
 java.lang.Class<? extends HystrixCommand> getImplementingClass()
          The implementing class of the HystrixCommand.
 
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

HystrixRuntimeException

public HystrixRuntimeException(HystrixRuntimeException.FailureType failureCause,
                               java.lang.Class<? extends HystrixCommand> commandClass,
                               java.lang.String message,
                               java.lang.Exception cause,
                               java.lang.Throwable fallbackException)

HystrixRuntimeException

public HystrixRuntimeException(HystrixRuntimeException.FailureType failureCause,
                               java.lang.Class<? extends HystrixCommand> commandClass,
                               java.lang.String message,
                               java.lang.Throwable cause,
                               java.lang.Throwable fallbackException)
Method Detail

getFailureType

public HystrixRuntimeException.FailureType getFailureType()
The type of failure that caused this exception to be thrown.

Returns:
HystrixRuntimeException.FailureType

getImplementingClass

public java.lang.Class<? extends HystrixCommand> getImplementingClass()
The implementing class of the HystrixCommand.

Returns:
Class<? extends HystrixCommand>

getFallbackException

public java.lang.Throwable getFallbackException()
The Throwable that was thrown when trying to retrieve a fallback.

Returns:
Throwable