Class NetworkUnavailableException

  • All Implemented Interfaces:
    java.io.Serializable

    
    public final class NetworkUnavailableException
    extends Exception
                        

    Exception thrown when a network operation cannot be completed due to network unavailability.

    This exception is specifically used to distinguish network unavailability issues from other types of exceptions that might occur during API operations. When this exception is thrown, the SDK can decide whether to queue the request for later retry based on the current configuration settings.

    try {
        val campaign = apiClient.postActivity(materialId)
    } catch (e: NetworkUnavailableException) {
        // Handle network unavailability - possibly queue for retry
        pendingRequestManager.addPendingRequest(materialId)
    }
    Since:

    1.0.0

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      • Methods inherited from class kotlin.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NetworkUnavailableException

        NetworkUnavailableException(String message, Throwable cause)
        Creates a new NetworkUnavailableException with the specified message and optional cause
    • Method Detail