Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract class KlaviyoException(val message: String) : Exception

Base class for exceptions thrown within the Klaviyo SDK

Link copied to clipboard
object KLog : Log
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias Operation<T> = () -> T
Link copied to clipboard
typealias Registration = () -> Any
Link copied to clipboard
object Registry

Services registry for decoupling SDK components Acts as a very basic Service Locator for internal SDK dependencies

Functions

Link copied to clipboard
fun Log.Level.log(tag: String, msg: String, ex: Throwable? = null): Int

Bridge between the Klaviyo Log levels and Android static log functions

Link copied to clipboard
fun <Caller> Caller.safeApply(errorQueue: Queue<Operation<Unit>>? = null, block: Operation<Unit>): Caller

Safe apply function that logs KlaviyoException rather than crash

Link copied to clipboard

Safely invoke a function and log KlaviyoExceptions rather than crash Take care not to nest safeCall invocations, because the inner exception will not halt execution of the outer method.