Package com.castlabs.android.player.exceptions

# Class TunnelingException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.castlabs.android.player.exceptions.TunnelingException

All Implemented Interfaces:
  `Serializable`

public class TunnelingException extends Exception
Exception that is raised when tunneling mode can not be enabled because of specified reasons.

Since:
  4.2.74
See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `TunnelingException.Reason`
  The reason why tunneling mode could not be enabled.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final TunnelingException.Reason`
  `reason`
  The reason for the exception.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static TunnelingException`
  `create(TunnelingException.Reason reason, String message)`
  Creates a new TunnelingException.
  `String`
  `reasonString()`
  Returns a string representation of the reason for this exception.
  `static String`
  `reasonString(TunnelingException.Reason reason)`
  Returns a string representation of the given reason.

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### reason

    @Nullable public final TunnelingException.Reason reason
    The reason for the exception.

- ## Method Details

  - ### create

    @NonNull public static TunnelingException create(@Nullable TunnelingException.Reason reason, @NonNull String message)
    Creates a new TunnelingException.
    Parameters:
      `reason` - The reason for the exception.
      `message` - The detail message.
    Returns:
      A new TunnelingException.

  - ### reasonString

    @NonNull public String reasonString()
    Returns a string representation of the reason for this exception.
    Returns:
      A string representation of the reason.

  - ### reasonString

    @NonNull public static String reasonString(@Nullable TunnelingException.Reason reason)
    Returns a string representation of the given reason.
    Parameters:
      `reason` - The reason.
    Returns:
      A string representation of the reason.