public class

KnowledgeOfflineException

extends OfflineException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ com.salesforce.android.service.common.fetchsave.exceptions.OfflineException
         ↳ com.salesforce.android.knowledge.core.exceptions.KnowledgeOfflineException

Class Overview

Exception type that is returned when a request cannot be serviced because the needed data has not been previously cached and the device is offline.

This exception type may be used to distinguish between cases when the device is offline and other generic exceptions. It may be useful to indicate to the user that the device is offline when this error is returned.

Usage Example:

   mKnowledgeClient.submit(request).onError(error -> {
     if (error instanceof KnowledgeOfflineException) {
       showOfflineError();
     } else {
       showGenericError();
     }
   });
 

Summary

Public Constructors
KnowledgeOfflineException()
Constructs a new exception with null as its detail message.
KnowledgeOfflineException(String message)
Constructs a new exception with the specified detail message.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public KnowledgeOfflineException ()

Constructs a new exception with null as its detail message. The cause is not initialized, and may be subsequently initialized by a call to initCause(Throwable).

public KnowledgeOfflineException (String message)

Constructs a new exception with the specified detail message. The cause is not initialized, and may be subsequently initialized by a call to initCause(Throwable).