Skip to content

//sorisdk/com.iplateia.sorisdk/NetworkUnavailableException

NetworkUnavailableException ​

class NetworkUnavailableException(message: String, cause: Throwable? = null) : 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.

Usage Example ​

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

Since ​

1.0.0

See also ​

PendingRequestManager
SORIConfig.enableDelayedSending

Constructors ​

NetworkUnavailableException[androidJvm]
constructor(message: String, cause: Throwable? = null)
Creates a new NetworkUnavailableException with the specified message and optional cause

Properties ​

NameSummary
cause[androidJvm]
open val cause: Throwable?
message[androidJvm]
open val message: String?

Functions ​

NameSummary
addSuppressed[androidJvm]
fun addSuppressed(p0: Throwable)
fillInStackTrace[androidJvm]
open fun fillInStackTrace(): Throwable
getLocalizedMessage[androidJvm]
open fun getLocalizedMessage(): String
getStackTrace[androidJvm]
open fun getStackTrace(): Array<StackTraceElement>
getSuppressed[androidJvm]
fun getSuppressed(): Array<Throwable>
initCause[androidJvm]
open fun initCause(p0: Throwable): Throwable
printStackTrace[androidJvm]
open fun printStackTrace()
open fun printStackTrace(p0: PrintStream)
open fun printStackTrace(p0: PrintWriter)
setStackTrace[androidJvm]
open fun setStackTrace(p0: Array<StackTraceElement>)