-
- All Implemented Interfaces:
-
java.io.Serializable
public class Resource.Exception extends UserException
Errors occurring while accessing a resource.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResource.Exception.BadRequestEquivalent to a 400 HTTP error.
public final classResource.Exception.NotFoundEquivalent to a 404 HTTP error.
public final classResource.Exception.ForbiddenEquivalent to a 403 HTTP error.
This can be returned when trying to read a resource protected with a DRM that is not unlocked.
public final classResource.Exception.UnavailableEquivalent to a 503 HTTP error.
Used when the source can't be reached, e.g. no Internet connection, or an issue with the file system. Usually this is a temporary error.
public classResource.Exception.OfflineThe Internet connection appears to be offline.
public final classResource.Exception.OutOfMemoryEquivalent to a 507 HTTP error.
Used when the requested range is too large to be read in memory.
public classResource.Exception.CancelledThe request was cancelled by the caller.
For example, when a coroutine is cancelled.
public final classResource.Exception.OtherFor any other error, such as HTTP 500.
public classResource.Exception.Companion
-
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 org.readium.r2.shared.UserException
getUserMessage -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-