KmpWorkerException
Base class for all exceptions thrown by KMPWorker.
Use the specific subclasses to handle individual error conditions:
try {
kmpWorker.enqueue(request)
} catch (e: KmpWorkerException.TaskAlreadyEnqueuedException) {
// task is already scheduled — safe to ignore or cancel first
}Inheritors
Types
Thrown when a TaskChain fails at one of its steps and cannot continue. The chain transitions to a failed state; already-completed steps are not rolled back.
Thrown when a TaskRequest is constructed with invalid parameters — e.g. a blank TaskRequest.id or a negative repeat interval.
Thrown when KmpWorker.enqueue is called with an id that is already active (Scheduled or Running) and the caller did not set replaceExisting = true.
Thrown when KmpWorker.observe, KmpWorker.cancel, or KmpWorker.getState references a task ID that has never been registered or has been purged.
Thrown when a task exceeds KmpWorkerConfig.taskTimeout and is forcefully stopped. The task transitions to TaskState.TimedOut before this exception propagates.